Packages

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

Classes

  • dibi
  • DibiConnection
  • DibiDataSource
  • DibiDateTime
  • DibiEvent
  • DibiFileLogger
  • DibiFirePhpLogger
  • DibiFluent
  • DibiObject
  • DibiResult
  • DibiResultIterator
  • DibiRow
  • DibiTranslator

Interfaces

  • IDataSource
  • IDibiDriver
  • IDibiReflector
  • IDibiResultDriver

Exceptions

  • DibiDriverException
  • DibiException
  • DibiNotImplementedException
  • DibiNotSupportedException
  • DibiPcreException
  • Overview
  • Package
  • Class
  • Tree

Interface IDibiDriver

dibi driver interface.

Direct known implementers

DibiFirebirdDriver, DibiMsSql2005Driver, DibiSqliteDriver, DibiMsSqlDriver, DibiMySqlDriver, DibiMySqliDriver, DibiOdbcDriver, DibiOracleDriver, DibiPdoDriver, DibiPostgreDriver, DibiSqlite3Driver
Package: dibi
Located at libs/interfaces.php
Methods summary
public
# connect( array & $config )

Connects to a database.

Connects to a database.

Parameters

$config
array

Throws

DibiException
public
# disconnect( )

Disconnects from a database.

Disconnects from a database.

Throws

DibiException
public IDibiResultDriver|null
# query( string $sql )

Internal: Executes the SQL query.

Internal: Executes the SQL query.

Parameters

$sql
string
SQL statement.

Returns

IDibiResultDriver|null

Throws

DibiDriverException
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
public integer|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.

Returns

integer|false
int on success or FALSE on failure
public
# begin( string $savepoint = NULL )

Begins a transaction (if supported).

Begins a transaction (if supported).

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException
public
# commit( string $savepoint = NULL )

Commits statements in a transaction.

Commits statements in a transaction.

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException
public
# rollback( string $savepoint = NULL )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string
optional savepoint name

Throws

DibiDriverException
public mixed
# getResource( )

Returns the connection resource.

Returns the connection resource.

Returns

mixed
public IDibiReflector
# getReflector( )

Returns the connection reflector.

Returns the connection reflector.

Returns

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

Returns

string
encoded value

Throws

InvalidArgumentException
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
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
dibi API documentation API documentation generated by ApiGen 2.3.0