Interface IDibiDriver
dibi driver interface.
Direct Known Implementers
DibiFirebirdDriver, DibiMsSql2005Driver, DibiMsSqlDriver, DibiMySqlDriver, DibiMySqliDriver, DibiOdbcDriver, DibiOracleDriver, DibiPdoDriver, DibiPostgreDriver, DibiSqlite3Driver, DibiSqliteDriver
public
void
|
#
connect(
array
& $config
)
Connects to a database. |
public
void
|
#
disconnect(
)
Disconnects from a database. |
public
IDibiResultDriver|NULL
|
#
query(
string
$sql
)
Internal: Executes the SQL query. |
public
int|FALSE
|
#
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|FALSE number of rows or FALSE on error
|
public
int|FALSE
|
#
getInsertId(
$sequence
)
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. Returnsint|FALSE int on success or FALSE on failure
|
public
void
|
#
begin(
string
$savepoint = NULL
)
Begins a transaction (if supported). Begins a transaction (if supported). Parameters$savepoint string optional savepoint nameThrows |
public
void
|
#
commit(
string
$savepoint = NULL
)
Commits statements in a transaction. Commits statements in a transaction. Parameters$savepoint string optional savepoint nameThrows |
public
void
|
#
rollback(
string
$savepoint = NULL
)
Rollback changes in a transaction. Rollback changes in a transaction. Parameters$savepoint string optional savepoint nameThrows |
public
mixed
|
#
getResource(
)
Returns the connection resource. Returns the connection resource. |
public
IDibiReflector
|
#
getReflector(
)
Returns the connection reflector. Returns the connection reflector. |
public
string
|
#
escape(
string
$value,
string
$type
)
Encodes data for use in a SQL statement. Encodes data for use in a SQL statement. Parameters$value string value$type string type (dibi::TEXT, dibi::BOOL, ...)Returnsstring encoded value
Throws
InvalidArgumentException
|
public
string
|
#
escapeLike(
string
$value,
int
$pos
)
Encodes string for use in a LIKE statement. Encodes string for use in a LIKE statement. Parameters$value string$pos int |
public
void
|
#
applyLimit(
string
& $sql,
int
$limit,
int
$offset
)
Injects LIMIT/OFFSET to the SQL query. Injects LIMIT/OFFSET to the SQL query. Parameters$sql string &$sql The SQL query that will be modified.$limit int $limit$offset int $offset |