# \CGExtensions\querysql_resultset

A class to allow iterating and fetching the results from an SQL query.

## Summary

Methods
Properties
Constants
__construct()
get_object()
get_query()
RecordCount()
MoveNext()
MoveFirst()
Rewind()
MoveLast()
EOF()
Close()
TotalMatches()
get_pagination()
FetchAll()
No public properties found
No constants found
wildcard()
_query()
$_rs
$_filter
$_totalmatching
N/A
No private methods found
No private properties found
N/A

File
  lib/query/class.sql_resultset.php
Class hierarchy
  \CGExtensions\query\base_resultset
  \CGExtensions\query\resultset
  \CGExtensions\query\sql_resultset

## Tags

todo |

## Properties

### $_rs

    $_rs

A member to store the database recordset.

#

Inherited from
  \CGExtensions\query\resultset

## Tags

todo |

### $_filter

    $_filter

The current filter object.

#

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### $_totalmatching

    $_totalmatching

The total number of records matching the query (independent of limit and offset)

#

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

## Methods

### __construct()

    __construct(\CGExtensions\query\query $query)

The constructor

#### Parameters

\CGExtensions\query\query | $query |

#

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### get_object()

    get_object() : object

Get an object representing the data at the current pointer position

#### Returns

object

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### get_query()

    get_query() : \CGExtensions\query\query

Return the query object

#### Returns

\CGExtensions\query\query

#

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### RecordCount()

    RecordCount() : int

Get the number of records returned in this recordset.

#### Returns

int

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### MoveNext()

    MoveNext()

Move the pointer to the next matching row in the recordset.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### MoveFirst()

    MoveFirst()

Move the pointer to the first matching row in the recordset.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### Rewind()

    Rewind()

Move the pointer to the first matching row in the recordset.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### MoveLast()

    MoveLast()

Move the pointer to the last matching row in the recordset.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### EOF()

    EOF() : bool

Test if the pointer is at the end of the recordset (there are no more records)

#### Returns

bool

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### Close()

    Close()

Close the recordset, and free resources.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### TotalMatches()

    TotalMatches() : int

return the total number of matches (independent of limit and offset)

#### Returns

int

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### get_pagination()

    get_pagination() : \CGExtensions\query\pagination

Get a pagination object for this query and resultset

#### Returns

\CGExtensions\query\pagination

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### FetchAll()

    FetchAll() : object[]

Fetch all of the records in this resultset as an array of objects.

#### Returns

object[]

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### wildcard()

    wildcard(string $str)

A convenience method used to aide in converting a string that may (or may not) contain wildcard (*) characters into a string suitable for use in a substring match

#### Parameters

string | $str | The string to parse for wildcards.

#

Inherited from
  \CGExtensions\query\resultset

## Tags

todo |

### _query()

    _query()

Use the data from the query object, perform the database query and set the recordset member.

This method should first see if the recordset has been set and not repeat the query... for the same of optimal behavior.

#

abstract

Inherited from
  \CGExtensions\query\base_resultset

## Tags

todo |

### class.sql_resultset.php