Méthode |
Description |
|
__construct ( $config, $name = NULL ) |
Connection options: (see driver-specific options too)
- lazy (bool) => if TRUE, connection will be established only when required
- result (array) => result set options
- formatDateTime => date-time format (if empty, DateTime objects will be returned)
- profiler (array or bool)
- run (bool) => enable profiler?
- file => file to log
- substitutes (array) => map of driver specific substitutes (under development) |
|
__destruct ( ) : void |
Automatically frees the resources allocated for this result set. |
|
__sleep ( ) |
Prevents serialization. |
|
__wakeup ( ) |
Prevents unserialization. |
|
affectedRows ( ) : integer |
Gets the number of affected rows. Alias for getAffectedRows(). |
|
alias ( &$config, $key, $alias ) |
|
|
begin ( $savepoint = NULL ) : void |
Begins a transaction (if supported). |
|
command ( ) : dibi\Fluent |
|
|
commit ( $savepoint = NULL ) : void |
Commits statements in a transaction. |
|
connect ( ) : void |
Connects to a database. |
|
createResultSet ( dibi\ResultDriver $resultDriver ) : Result |
Result set factory. |
|
dataSource ( $args ) : dibi\DataSource |
Generates (translates) and returns SQL query as DataSource. |
|
delete ( $table ) : dibi\Fluent |
|
|
disconnect ( ) : void |
Disconnects from a database. |
|
fetch ( $args ) : Row |
Executes SQL query and fetch result - shortcut for query() & fetch(). |
|
fetchAll ( $args ) : Row[] |
Executes SQL query and fetch results - shortcut for query() & fetchAll(). |
|
fetchPairs ( $args ) : array |
Executes SQL query and fetch pairs - shortcut for query() & fetchPairs(). |
|
fetchSingle ( $args ) : string |
Executes SQL query and fetch first column - shortcut for query() & fetchSingle(). |
|
getAffectedRows ( ) : integer |
Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. |
|
getConfig ( $key = NULL, $default = NULL ) : mixed |
Returns configuration variable. If no $key is passed, returns the entire array. |
|
getDatabaseInfo ( ) : Dibi\Reflection\Database |
Gets a information about the current database. |
|
getDriver ( ) : dibi\Driver |
Returns the driver and connects to a database in lazy mode. |
|
getInsertId ( $sequence = NULL ) : integer |
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. |
|
getSubstitutes ( ) : HashMap |
Returns substitution hashmap. |
|
insert ( $table, $args ) : dibi\Fluent |
|
|
insertId ( $sequence = NULL ) : integer |
Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId(). |
|
isConnected ( ) : boolean |
Returns TRUE when connection was established. |
|
literal ( $value ) : dibi\Literal |
|
|
loadFile ( $file ) : integer |
Import SQL dump from file. |
|
nativeQuery ( $sql ) : Result | integer |
Executes the SQL query. |
|
query ( $args ) : Result | integer |
Generates (translates) and executes SQL query. |
|
rollback ( $savepoint = NULL ) : void |
Rollback changes in a transaction. |
|
select ( $args ) : dibi\Fluent |
|
|
substitute ( $value ) : string |
Provides substitution. |
|
test ( $args ) : boolean |
Generates and prints SQL query. |
|
translate ( $args ) : string |
Generates SQL query. |
|
update ( $table, $args ) : dibi\Fluent |
|
|