Свойство | Type | Description | |
---|---|---|---|
$Connection | Contains a reference to the open database connection. FALSE by default. This property is passed by reference from the Database object. Do not manipulate or assign anything to this property! |
Свойство | Type | Description | |
---|---|---|---|
$_DatasetType | what type of result is returned from the various methods by default. Either DATASET_TYPE_OBJECT or DATASET_TYPE_ARRAY. | ||
$_EOF | boolean | ||
$_Result | An array of either objects or associative arrays with the data in this dataset. |
Méthode | Description | |
---|---|---|
PDOStatement ( PDOStatement &$PDOStatement = false ) | Assigns the pdostatement object to this object. | |
__construct ( $Result = null, $DataSetType = null ) | ||
__destruct ( ) | ||
clean ( ) | Clean sensitive data out of the object. | |
count ( ) : integer | Count elements of this object. This method provides support for the countable interface. | |
dataSeek ( integer $RowIndex ) | Moves the dataset's internal cursor pointer to the specified RowIndex. | |
datasetType ( boolean $DatasetType = false ) | ||
expandAttributes ( string $Name = 'Attributes' ) | ||
firstRow ( string $DatasetType = false ) : boolean | array | stdClass | Returns the first row or FALSE if there are no rows to return. | |
format ( string $FormatMethod ) : Gdn_Dataset | Format the resultset with the given method. | |
freePDOStatement ( boolean $DestroyPDOStatement = true ) | Free's the result resource referenced by $this->_PDOStatement. | |
getIterator ( ) | Interface method for IteratorAggregate. | |
importDataset ( array $Resultset ) | Allows you to fill this object's result set with a foreign data set in the form of an array of associative arrays (or objects). | |
index ( array | Traversable $Data, string | array $Columns, array $Options = [] ) : array | Index a result array. | |
join ( array &$Data, array $Columns, array $Options = [] ) | ||
lastRow ( string $DatasetType = false ) | Returns the last row in the or FALSE if there are no rows to return. | |
nextRow ( string $DatasetType = false ) | Returns the next row or FALSE if there are no more rows. | |
numFields ( ) | Returns the number of fields in the DataSet. | |
numRows ( string $DatasetType = false ) | Returns the number of rows in the DataSet. | |
previousRow ( string $DatasetType = false ) | Returns the previous row in the requested format. | |
result ( string $DatasetType = false ) | Returns an array of data as the specified result type: object or array. | |
resultArray ( ) : array& | Returns an array of associative arrays containing the ResultSet data. | |
resultObject ( $FormatType = '' ) | Returns an array of objects containing the ResultSet data. | |
row ( integer $RowIndex ) : mixed | Returns the requested row index as the requested row type. | |
unserialize ( array $Fields = ['Attributes', 'Data'] ) | Unserialize the fields in the dataset. | |
value ( string $ColumnName, string $DefaultValue = null ) : mixed | Advances to the next row and returns the value from a column. |
Méthode | Description | |
---|---|---|
_fetchAllRows ( string $DatasetType = false ) | Fetches all rows from the PDOStatement object into the resultset. |
public PDOStatement ( PDOStatement &$PDOStatement = false ) | ||
$PDOStatement | PDOStatement | The PDO Statement Object being assigned. |
protected _fetchAllRows ( string $DatasetType = false ) | ||
$DatasetType | string | The format in which the result should be returned: object or array. It will fill a different array depending on which type is specified. |
public datasetType ( boolean $DatasetType = false ) | ||
$DatasetType | boolean |
public expandAttributes ( string $Name = 'Attributes' ) | ||
$Name | string |
public freePDOStatement ( boolean $DestroyPDOStatement = true ) | ||
$DestroyPDOStatement | boolean |
public importDataset ( array $Resultset ) | ||
$Resultset | array | The array of arrays or objects that represent the data to be traversed. |
public static index ( array | Traversable $Data, string | array $Columns, array $Options = [] ) : array | ||
$Data | array | Traversable | The array to index. It is formatted similar to the array returned by Gdn_DataSet::Result(). |
$Columns | string | array | The name of the column to index on or an array of columns to index on. |
$Options | array | An array of options for the method. - Sep: The string to seperate index columns by. Default '|'. - Unique: Whether or not the results are unique. - true (default): The index is unique. - false: The index is not unique and each indexed row will be an array or arrays. |
Résultat | array |
public static join ( array &$Data, array $Columns, array $Options = [] ) | ||
$Data | array | |
$Columns | array | The columns/table information for the join. Depending on the argument's index it will be interpreted differently. - numeric: This column will come be added to the resulting join. The value can be either a string or a two element array where the second element specifies an alias. - alias: The alias of the child table in the query. - child: The name of the child column. - column: The name of the column to put the joined data into. Can't be used with prefix. - parent: The name of the parent column. - table: The name of the child table in the join. - prefix: The name of the prefix to give the columns. Can't be used with column. |
$Options | array | An array of extra options. - sql: A Gdn_SQLDriver with the child query. - type: The join type, either JOIN_INNER, JOIN_LEFT. This defaults to JOIN_LEFT. |
public previousRow ( string $DatasetType = false ) | ||
$DatasetType | string | The format in which the result should be returned: object or array. |
public result ( string $DatasetType = false ) | ||
$DatasetType | string | The format in which to return a row: object or array. The following values are supported. - DATASET_TYPE_ARRAY: An array of associative arrays. - DATASET_TYPE_OBJECT: An array of standard objects. - FALSE: The current value of the DatasetType property will be used. |
public resultArray ( ) : array& | ||
Résultat | array& |
public resultObject ( $FormatType = '' ) |
public unserialize ( array $Fields = ['Attributes', 'Data'] ) | ||
$Fields | array |
public $Connection |
protected $_DatasetType |