fStatementclassv1.0.0b2
Representation of a prepared statement for use with the fDatabase class
| 1.0.0b2 | Added IBM DB2 support 4/13/10 |
|---|---|
| 1.0.0b | The initial implementation 3/2/10 |
Methods
->__construct() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Sets up a prepared statement
Signature
fResult __construct( fDatabase $database, string $query, array $placeholders, $untranslated_sql, string $untranslated_query )
Parameters
| fDatabase | $database | The database object this result set was created from |
| string | $query | MSSQL only: the character set to transcode from since MSSQL doesn't do UTF-8 |
| array | $placeholders | The data type placeholders |
| string | $untranslated_query | If the SQL was translated - only relevant for Oracle |
| $untranslated_sql |
->__destruct() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Frees up the result object to save memory
Signature
void __destruct( )
->__get() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
All requests that hit this method should be requests for callbacks
Signature
callback __get( string $method )
Parameters
| string | $method | The method to create a callback for |
Returns
The callback for the method requested
->execute() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement without returning a result
Signature
mixed execute( array $params, mixed &$extra, boolean $different )
Parameters
| array | $params | The parameters for the statement |
| mixed | &$extra | A variable to place extra information needed by some database extensions |
| boolean | $different | If this statement is different than the last statement run on the fDatabase instance |
Returns
The (usually boolean) result of the extension function/method call
->executeQuery() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement in buffered mode
Signature
void executeQuery( fResult $result, array $params, mixed &$extra, boolean $different )
Parameters
->executeUnbufferedQuery() internal public
Please note: this method is public, however it is primarily intended for internal use by Flourish and will normally not be useful in site/application code
Executes the statement in unbuffered mode (if possible)
Signature
void executeUnbufferedQuery( fUnbufferedResult $result, array $params, mixed &$extra, boolean $different )
Parameters
| fUnbufferedResult | $result | The object to place the result into |
| array | $params | The parameters for the statement |
| mixed | &$extra | A variable to place extra information needed by some database extensions |
| boolean | $different | If this statement is different than the last statement run on the fDatabase instance |
->getSQL() public
Returns the SQL for the prepared statement
Signature
string getSQL( )
Returns
The SQL statement
