Class DibiFirebirdDriver
The dibi driver for Firebird/InterBase database.
Driver options:
- database ⇒ the path to database file (server:/path/database.fdb)
- username (or user)
- password (or pass)
- charset ⇒ character encoding to set
- buffers (int) ⇒ buffers is the number of database buffers to allocate for
the server-side cache. If 0 or omitted, server chooses its own default.
- resource (resource) ⇒ existing connection resource
- lazy, profiler, result, substitutes, … ⇒ see DibiConnection options
- DibiObject
-
DibiFirebirdDriver implements IDibiDriver, IDibiResultDriver, IDibiReflector
public
|
#
__construct(
)
Throws |
public
void
|
#
connect(
array
& $config
)
Connects to a database. |
public
void
|
#
disconnect(
)
Disconnects from a database. |
public
IDibiResultDriver|NULL
|
#
query(
string
$sql
)
Executes the SQL query. Executes the SQL query. Parameters$sql string SQL statement.Throws
DibiDriverException|DibiException
Implementation of |
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
Implementation of |
public
int|FALSE
|
#
getInsertId(
string
$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. Parameters$sequence string generator nameReturnsint|FALSE int on success or FALSE on failure
Implementation of |
public
void
|
#
begin(
string
$savepoint = NULL
)
Begins a transaction (if supported). Begins a transaction (if supported). Parameters$savepoint string optional savepoint nameThrowsImplementation of |
public
void
|
#
commit(
string
$savepoint = NULL
)
Commits statements in a transaction. Commits statements in a transaction. Parameters$savepoint string optional savepoint nameThrowsImplementation of |
public
void
|
#
rollback(
string
$savepoint = NULL
)
Rollback changes in a transaction. Rollback changes in a transaction. Parameters$savepoint string optional savepoint nameThrowsImplementation of |
public
bool
|
#
inTransaction(
)
Is in transaction? Is in transaction? |
public
resource
|
#
getResource(
)
Returns the connection resource. |
public
IDibiReflector
|
#
getReflector(
)
Returns the connection reflector. |
public
string
|
#
escape(
mixed
$value,
string
$type
)
Encodes data for use in a SQL statement. Encodes data for use in a SQL statement. Parameters$value mixed value$type string type (dibi::TEXT, dibi::BOOL, ...)Returnsstring encoded value
Throws
InvalidArgumentException
Implementation of |
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 intImplementation of |
public
string
|
#
unescape(
string
$value,
string
$type
)
Decodes data from result set. Decodes data from result set. Parameters$value string value$type string type (dibi::BINARY)Returnsstring decoded value
Throws
InvalidArgumentException
Implementation of |
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 $offsetImplementation of |
public
int
|
#
getRowCount(
)
Returns the number of rows in a result set. |
public
array
|
#
fetch(
bool
$assoc
)
Fetches the row at current position and moves the internal cursor to the next position. Fetches the row at current position and moves the internal cursor to the next position. Parameters$assoc bool TRUE for associative array, FALSE for numericReturnsarray array on success, nonarray if no next record
Implementation of |
public
boolean
|
#
seek(
int
$row
)
Moves cursor position without fetching row. Moves cursor position without fetching row. Parameters$row int the 0-based cursor pos to seek toReturnsboolean TRUE on success, FALSE if unable to seek to specified record
ThrowsImplementation of |
public
void
|
#
free(
)
Frees the resources allocated for this result set. |
public
mysqli_result
|
#
getResultResource(
)
Returns the result set resource. |
public
array
|
#
getResultColumns(
)
Returns metadata for all columns in a result set. Returns metadata for all columns in a result set. Implementation of |
public
array
|
#
getTables(
)
Returns list of tables. |
public
array
|
#
getColumns(
string
$table
)
Returns metadata for all columns in a table. Returns metadata for all columns in a table. Parameters$table stringImplementation of |
public
array
|
#
getIndexes(
string
$table
)
Returns metadata for all indexes in a table (the constraints are included). Returns metadata for all indexes in a table (the constraints are included). Parameters$table stringImplementation of |
public
array
|
#
getForeignKeys(
string
$table
)
Returns metadata for all foreign keys in a table. Returns metadata for all foreign keys in a table. Parameters$table stringImplementation of |
public
array
|
#
getIndices(
string
$table
)
Returns list of indices in given table (the constraints are not listed). Returns list of indices in given table (the constraints are not listed). Parameters$table string |
public
array
|
#
getConstraints(
string
$table
)
Returns list of constraints in given table. Returns list of constraints in given table. Parameters$table string |
public
array
|
#
getTriggersMeta(
string
$table = NULL
)
Returns metadata for all triggers in a table or database. Returns metadata for all triggers in a table or database. (Only if user has permissions on ALTER TABLE, INSERT/UPDATE/DELETE record in table) Parameters$table string |
public
array
|
#
getTriggers(
string
$table = NULL
)
Returns list of triggers for given table. Returns list of triggers for given table. (Only if user has permissions on ALTER TABLE, INSERT/UPDATE/DELETE record in table) Parameters$table string |
public
array
|
#
getProceduresMeta(
)
Returns metadata from stored procedures and their input and output parameters. Returns metadata from stored procedures and their input and output parameters. |
public
array
|
#
getProcedures(
)
Returns list of stored procedures. Returns list of stored procedures. |
public
array
|
#
getGenerators(
)
Returns list of generators. Returns list of generators. |
public
array
|
#
getFunctions(
)
Returns list of user defined functions (UDF). Returns list of user defined functions (UDF). |
Methods Inherited From DibiObject
getClass(), getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
ERROR_EXCEPTION_THROWN |
-836 # |