Packages

  • dibi
    • drivers
    • nette
    • reflection
  • None
  • PHP

Classes

  • DibiFirebirdDriver
  • DibiMsSql2005Driver
  • DibiMsSqlDriver
  • DibiMySqlDriver
  • DibiMySqliDriver
  • DibiOdbcDriver
  • DibiOracleDriver
  • DibiPdoDriver
  • DibiPostgreDriver
  • DibiSqlite3Driver
  • DibiSqliteDriver

Exceptions

  • DibiProcedureException
  • Overview
  • Package
  • Class
  • Tree

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
Extended by DibiFirebirdDriver implements IDibiDriver, IDibiResultDriver, IDibiReflector
Package: dibi\drivers
Author: Tomáš Kraina, Roman Sklenář
Located at drivers/firebird.php
Methods summary
public
# __construct( )

Throws

DibiNotSupportedException
public
# connect( array & $config )

Connects to a database.

Connects to a database.

Parameters

$config
array

Throws

DibiException

Implementation of

IDibiDriver::connect
public
# disconnect( )

Disconnects from a database.

Disconnects from a database.

Throws

DibiException

Implementation of

IDibiDriver::disconnect
public IDibiResultDriver|null
# query( string $sql )

Executes the SQL query.

Executes the SQL query.

Parameters

$sql
string
SQL statement.

Returns

IDibiResultDriver|null

Throws

DibiDriverException|DibiException

Implementation of

IDibiDriver::query
public integer|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.

Returns

integer|false
number of rows or FALSE on error

Implementation of

IDibiDriver::getAffectedRows
public integer|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 name

Returns

integer|false
int on success or FALSE on failure

Implementation of

IDibiDriver::getInsertId
public
# begin( string $savepoint = NULL )

Begins a transaction (if supported).

Begins a transaction (if supported).

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException

Implementation of

IDibiDriver::begin
public
# commit( string $savepoint = NULL )

Commits statements in a transaction.

Commits statements in a transaction.

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException

Implementation of

IDibiDriver::commit
public
# rollback( string $savepoint = NULL )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException

Implementation of

IDibiDriver::rollback
public boolean
# inTransaction( )

Is in transaction?

Is in transaction?

Returns

boolean
public resource
# getResource( )

Returns the connection resource.

Returns the connection resource.

Returns

resource

Implementation of

IDibiDriver::getResource
public IDibiReflector
# getReflector( )

Returns the connection reflector.

Returns the connection reflector.

Returns

IDibiReflector

Implementation of

IDibiDriver::getReflector
public IDibiResultDriver
# createResultDriver( resource $resource )

Result set driver factory.

Result set driver factory.

Parameters

$resource
resource

Returns

IDibiResultDriver
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, ...)

Returns

string
encoded value

Throws

InvalidArgumentException

Implementation of

IDibiDriver::escape
public string
# escapeLike( string $value, integer $pos )

Encodes string for use in a LIKE statement.

Encodes string for use in a LIKE statement.

Parameters

$value
string
$pos
integer

Returns

string

Implementation of

IDibiDriver::escapeLike
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)

Returns

string
decoded value

Throws

InvalidArgumentException

Implementation of

IDibiResultDriver::unescape
public
# applyLimit( string & $sql, integer $limit, integer $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
integer
$offset
integer

Implementation of

IDibiDriver::applyLimit
public
# __destruct( )

Automatically frees the resources allocated for this result set.

Automatically frees the resources allocated for this result set.

public integer
# getRowCount( )

Returns the number of rows in a result set.

Returns the number of rows in a result set.

Returns

integer

Implementation of

IDibiResultDriver::getRowCount
public array
# fetch( boolean $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
boolean
TRUE for associative array, FALSE for numeric

Returns

array
array on success, nonarray if no next record
public boolean
# seek( integer $row )

Moves cursor position without fetching row.

Moves cursor position without fetching row.

Parameters

$row
integer
the 0-based cursor pos to seek to

Returns

boolean
TRUE on success, FALSE if unable to seek to specified record

Throws

DibiException

Implementation of

IDibiResultDriver::seek
public
# free( )

Frees the resources allocated for this result set.

Frees the resources allocated for this result set.

Implementation of

IDibiResultDriver::free
public mysqli_result
# getResultResource( )

Returns the result set resource.

Returns the result set resource.

Returns

mysqli_result

Implementation of

IDibiResultDriver::getResultResource
public array
# getResultColumns( )

Returns metadata for all columns in a result set.

Returns metadata for all columns in a result set.

Returns

array

Implementation of

IDibiResultDriver::getResultColumns
public array
# getTables( )

Returns list of tables.

Returns list of tables.

Returns

array

Implementation of

IDibiReflector::getTables
public array
# getColumns( string $table )

Returns metadata for all columns in a table.

Returns metadata for all columns in a table.

Parameters

$table
string

Returns

array

Implementation of

IDibiReflector::getColumns
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
string

Returns

array

Implementation of

IDibiReflector::getIndexes
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
string

Returns

array

Implementation of

IDibiReflector::getForeignKeys
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

Returns

array
public array
# getConstraints( string $table )

Returns list of constraints in given table.

Returns list of constraints in given table.

Parameters

$table
string

Returns

array
public array
# getTriggersMeta( string $table = NULL )

Returns metadata for all triggers in a table or database. (Only if user has permissions on ALTER TABLE, INSERT/UPDATE/DELETE record in table)

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

Returns

array
public array
# getTriggers( string $table = NULL )

Returns list of triggers for given table. (Only if user has permissions on ALTER TABLE, INSERT/UPDATE/DELETE record in 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

Returns

array
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.

Returns

array
public array
# getProcedures( )

Returns list of stored procedures.

Returns list of stored procedures.

Returns

array
public array
# getGenerators( )

Returns list of generators.

Returns list of generators.

Returns

array
public array
# getFunctions( )

Returns list of user defined functions (UDF).

Returns list of user defined functions (UDF).

Returns

array
Methods inherited from DibiObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getClass(), getReflection()
Constants summary
integer ERROR_EXCEPTION_THROWN -836
#
dibi API documentation API documentation generated by ApiGen 2.3.0