public
|
#
__construct(
mixed
$config,
string
$name = NULL
)
Connection options: (see driver-specific options too) Connection options: (see driver-specific options too) Parameters$config mixed connection parameters$name string connection nameThrows |
public
void
|
#
__destruct(
)
Automatically frees the resources allocated for this result set. Automatically frees the resources allocated for this result set. |
final public
void
|
#
connect(
)
Connects to a database. Connects to a database. |
final public
void
|
#
disconnect(
)
Disconnects from a database. Disconnects from a database. |
final public
bool
|
#
isConnected(
)
Returns TRUE when connection was established. Returns TRUE when connection was established. |
final public
mixed
|
#
getConfig(
string
$key = NULL,
mixed
$default = NULL
)
Returns configuration variable. If no $key is passed, returns the entire array. Returns configuration variable. If no $key is passed, returns the entire array. Parameters$key string$default mixed default value to use if key not found |
public static
void
|
#
alias(
array
& $config,
string
$key,
string
$alias
)
Apply configuration alias or default values. Apply configuration alias or default values. Parameters$config array connect configuration$key string key$alias string alias key |
final public
IDibiDriver
|
#
getDriver(
)
Returns the driver and connects to a database in lazy mode. Returns the driver and connects to a database in lazy mode. |
final public
DibiResult|int
|
#
query(
array|mixed
$args
)
Generates (translates) and executes SQL query. Generates (translates) and executes SQL query. Parameters$args array|mixed one or more argumentsReturnsDibiResult|int result set object (if any)
Throws |
final public
string
|
#
translate(
array|mixed
$args
)
Generates and returns SQL query. Generates and returns SQL query. Parameters$args array|mixed one or more argumentsThrows |
public
|
#
sql(
$args
)
|
final public
bool
|
#
test(
array|mixed
$args
)
Generates and prints SQL query. Generates and prints SQL query. Parameters$args array|mixed one or more arguments |
final public
DibiDataSource
|
#
dataSource(
array|mixed
$args
)
Generates (translates) and returns SQL query as DibiDataSource. Generates (translates) and returns SQL query as DibiDataSource. Parameters$args array|mixed one or more argumentsThrows |
final public
DibiResult|int
|
#
nativeQuery(
string
$sql
)
Executes the SQL query. Executes the SQL query. Parameters$sql string SQL statement.ReturnsDibiResult|int result set object (if any)
Throws |
public
int
|
#
getAffectedRows(
)
Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. Gets the number of affected rows by the last INSERT, UPDATE or DELETE query. Returnsint number of rows
Throws |
public
int
|
#
affectedRows(
)
Gets the number of affected rows. Alias for getAffectedRows(). Gets the number of affected rows. Alias for getAffectedRows(). Returnsint number of rows
Throws |
public
int
|
#
getInsertId(
string
$sequence = NULL
)
Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query. Parameters$sequence string optional sequence nameThrows |
public
int
|
#
insertId(
string
$sequence = NULL
)
Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId(). Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId(). Parameters$sequence string optional sequence nameThrows |
public
void
|
#
begin(
string
$savepoint = NULL
)
Begins a transaction (if supported). Begins a transaction (if supported). Parameters$savepoint string optional savepoint name |
public
void
|
#
commit(
string
$savepoint = NULL
)
Commits statements in a transaction. Commits statements in a transaction. Parameters$savepoint string optional savepoint name |
public
void
|
#
rollback(
string
$savepoint = NULL
)
Rollback changes in a transaction. Rollback changes in a transaction. Parameters$savepoint string optional savepoint name |
public
DibiFluent
|
#
command(
)
|
public
DibiFluent
|
#
select(
string
$args
)
Parameters$args string column name |
public
DibiFluent
|
#
update(
string
$table,
array
$args
)
Parameters$table string table$args array |
public
DibiFluent
|
#
insert(
string
$table,
array
$args
)
Parameters$table string table$args array |
public
DibiFluent
|
#
delete(
string
$table
)
Parameters$table string table |
public
DibiConnection
|
#
setProfiler(
IDibiProfiler
$profiler = NULL
)
Parameters$profiler IDibiProfilerReturnsDibiConnection provides a fluent interface
|
public
IDibiProfiler
|
#
getProfiler(
)
|
public
DibiRow
|
#
fetch(
array|mixed
$args
)
Executes SQL query and fetch result – shortcut for query() & fetch(). Executes SQL query and fetch result – shortcut for query() & fetch(). Parameters$args array|mixed one or more argumentsThrows |
public
array
|
#
fetchAll(
array|mixed
$args
)
Executes SQL query and fetch results – shortcut for query() & fetchAll(). Executes SQL query and fetch results – shortcut for query() & fetchAll(). Parameters$args array|mixed one or more argumentsReturnsarray of DibiRow
Throws |
public
string
|
#
fetchSingle(
array|mixed
$args
)
Executes SQL query and fetch first column – shortcut for query() & fetchSingle(). Executes SQL query and fetch first column – shortcut for query() & fetchSingle(). Parameters$args array|mixed one or more argumentsThrows |
public
string
|
#
fetchPairs(
array|mixed
$args
)
Executes SQL query and fetch pairs – shortcut for query() & fetchPairs(). Executes SQL query and fetch pairs – shortcut for query() & fetchPairs(). Parameters$args array|mixed one or more argumentsThrows |
public
int
|
#
loadFile(
string
$file
)
Import SQL dump from file – extreme fast! Import SQL dump from file – extreme fast! Parameters$file string filenameReturnsint count of sql commands
|
public
DibiDatabaseInfo
|
#
getDatabaseInfo(
)
Gets a information about the current database. Gets a information about the current database. |
public
|
#
__wakeup(
)
Prevents unserialization. Prevents unserialization. |
public
|
#
__sleep(
)
Prevents serialization. Prevents serialization. |