Methods summary
public static
MvcCore\Ext\Models\Db\Statement
|
#
Prepare( string|string[] $sql, string|integer|array|stdClass|null $connectionNameOrConfig = NULL, array $driverOptions = [] )
Prepares a statement for execution and returns a statement object.
Prepares a statement for execution and returns a statement object.
Parameters
- $sql
- $connectionNameOrConfig
- $driverOptions
Returns
|
public
MvcCore\Ext\Models\Db\Connection
|
#
GetConnection( )
Return connection wrapper instance.
Return connection wrapper instance.
Returns
|
public
PDO
|
#
GetProvider( )
Return internal \PDO connection instance.
Return internal \PDO connection instance.
Returns
PDO
|
public
PDOStatement
|
#
GetProviderStatement( )
Return internal \PDOStatement instance.
Return internal \PDOStatement instance.
Returns
PDOStatement
|
public
array
|
#
GetDriverOptions( )
Return \PDO::prepare() second argument ($driver_options ) values.
Return \PDO::prepare() second argument ($driver_options ) values.
Returns
array
|
public
array
|
#
GetParams( )
Return execution params.
Returns
array Query params array, it could be sequential or associative array.
|
public
MvcCore\Ext\Models\Db\Statement
|
#
SetParams( array $params = [] )
Set execution params.
Parameters
- $params
Query params array, it could be sequential or associative array.
This parameter can be used as an infinite argument for the function.
Returns
|
public
boolean
|
#
GetExecResult( )
Returns prepared statement execution result.
(the \PDOStatement::execute() result).
Returns prepared statement execution result.
(the \PDOStatement::execute() result).
Returns
boolean
Throws
RuntimeException
|
public
boolean
|
#
Close( )
Close the statement cursor, enable the statement to be executed again.
Close the statement cursor, enable the statement to be executed again.
Returns
boolean
|
public
boolean
|
#
IsOpened( )
Return NULL if statement is prepared and not executed yet.
Return TRUE if statement is executed and if cursor is not closed yet.
Return FALSE if statement cursor is closed.
Return NULL if statement is prepared and not executed yet.
Return TRUE if statement is executed and if cursor is not closed yet.
Return FALSE if statement cursor is closed.
Returns
boolean
|
public
boolean
|
#
NextResultSet( )
Move statement result to the next rowset in a multi-rowset statement handle.
Move statement result to the next rowset in a multi-rowset statement handle.
Returns
boolean
Throws
RuntimeException
|
public
MvcCore\Ext\Models\Db\Readers\Multiple
|
#
FetchAll( array $params = [] )
Executes a statement with given params,
fetches all data from database at once and
returns multiple rows reader object.
Executes a statement with given params,
fetches all data from database at once and
returns multiple rows reader object.
Parameters
- $params
Query params array, it could be sequential or associative array.
This parameter can be used as an infinite argument for the function.
Returns
|
public
MvcCore\Ext\Models\Db\Readers\Stream
|
#
StreamAll( array $params = [] )
Executes a statement with given params,
doesn't fetch data from database yet,
only returns multiple rows stream reader object.
Executes a statement with given params,
doesn't fetch data from database yet,
only returns multiple rows stream reader object.
Parameters
- $params
Query params array, it could be sequential or associative array.
This parameter can be used as an infinite argument for the function.
Returns
|
public
MvcCore\Ext\Models\Db\Readers\Single
|
#
FetchOne( array $params = [] )
Executes a statement with given params,
fetches single row from database and
returns single row reader object.
Executes a statement with given params,
fetches single row from database and
returns single row reader object.
Parameters
- $params
Query params array, it could be sequential or associative array.
This parameter can be used as an infinite argument for the function.
Returns
|
public
MvcCore\Ext\Models\Db\Readers\Execution
|
#
Execute( array $params = [] )
Executes a statement with given params and
returns execution reader object.
Executes a statement with given params and
returns execution reader object.
Parameters
- $params
Query params array, it could be sequential or associative array.
This parameter can be used as an infinite argument for the function.
Returns
|