Namespaces

  • Dibi
    • Bridges
      • Nette
      • Tracy
    • Drivers
    • Loggers
    • Reflection

Classes

  • FirebirdReflector
  • FirebirdResult
  • MySqliResult
  • NoDataResult
  • OdbcDriver
  • OdbcReflector
  • OdbcResult
  • OracleDriver
  • OracleReflector
  • OracleResult
  • PdoDriver
  • PdoResult
  • PostgreDriver
  • PostgreReflector
  • PostgreResult
  • Sqlite3Driver
  • Sqlite3Result
  • SqliteDriver
  • SqliteReflector
  • SqliteResult
  • SqlsrvDriver
  • SqlsrvReflector
  • SqlsrvResult
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Dibi homepage

Class PostgreDriver

The driver for PostgreSQL database.

Driver options: - host, hostaddr, port, dbname, user, password, connect_timeout, options, sslmode, service => see PostgreSQL API - string => or use connection string - schema => the schema search path - charset => character encoding to set (default is utf8) - persistent (bool) => try to find a persistent link? - resource (resource) => existing connection resource

Dibi\Drivers\PostgreDriver implements Dibi\Driver uses Dibi\Strict
Namespace: Dibi\Drivers
Located at Dibi/Drivers/PostgreDriver.php
Methods summary
public
# __construct( array $config )

Throws

Dibi\NotSupportedException
Dibi\NotSupportedException
public
# disconnect( )

Disconnects from a database.

Disconnects from a database.

Throws

Exception
Exception

Implementation of

Dibi\Driver::disconnect()
public boolean
# ping( )

Pings database.

Pings database.

Returns

boolean
bool
public Dibi\ResultDriver|null
# query( string $sql )

Executes the SQL query.

Executes the SQL query.

Parameters

$sql

Returns

Dibi\ResultDriver|null
Dibi\ResultDriver|null

Throws

Dibi\DriverException
Dibi\DriverException

Implementation of

Dibi\Driver::query()
public static Dibi\DriverException
# createException( string $message, string $code = null, $sql = null )

Parameters

$message
$code
$sql
$sql

Returns

Dibi\DriverException
Dibi\DriverException
public integer|null
# 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|null
int|null

Implementation of

Dibi\Driver::getAffectedRows()
public integer|null
# getInsertId( string|null $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

Returns

integer|null
int|null

Implementation of

Dibi\Driver::getInsertId()
public
# begin( string $savepoint = null )

Begins a transaction (if supported).

Begins a transaction (if supported).

Parameters

$savepoint

Throws

Dibi\DriverException
Dibi\DriverException

Implementation of

Dibi\Driver::begin()
public
# commit( string $savepoint = null )

Commits statements in a transaction.

Commits statements in a transaction.

Parameters

$savepoint

Throws

Dibi\DriverException
Dibi\DriverException

Implementation of

Dibi\Driver::commit()
public
# rollback( string $savepoint = null )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint

Throws

Dibi\DriverException
Dibi\DriverException

Implementation of

Dibi\Driver::rollback()
public boolean
# inTransaction( )

Is in transaction?

Is in transaction?

Returns

boolean
bool
public resource|null
# getResource( )

Returns the connection resource.

Returns the connection resource.

Returns

resource|null
resource|null

Implementation of

Dibi\Driver::getResource()
public Dibi\Reflector
# getReflector( )

Returns the connection reflector.

Returns the connection reflector.

Returns

Dibi\Reflector
Dibi\Reflector

Implementation of

Dibi\Driver::getReflector()
public Dibi\Drivers\PostgreResult
# createResultDriver( resource $resource )

Result set driver factory.

Result set driver factory.

Parameters

$resource

Returns

Dibi\Drivers\PostgreResult
PostgreResult
public string
# escapeText( string $value )

Encodes data for use in a SQL statement.

Encodes data for use in a SQL statement.

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeText()
public string
# escapeBinary( string $value )

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeBinary()
public string
# escapeIdentifier( string $value )

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeIdentifier()
public string
# escapeBool( boolean $value )

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeBool()
public string
# escapeDate( DateTimeInterface|string|integer $value )

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeDate()
public string
# escapeDateTime( DateTimeInterface|string|integer $value )

Parameters

$value

Returns

string
string

Implementation of

Dibi\Driver::escapeDateTime()
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
$pos

Returns

string
string

Implementation of

Dibi\Driver::escapeLike()
public
# applyLimit( string & $sql, integer|null $limit, integer|null $offset )

Injects LIMIT/OFFSET to the SQL query.

Injects LIMIT/OFFSET to the SQL query.

Parameters

$sql
$limit
$offset

Implementation of

Dibi\Driver::applyLimit()
Methods used from Dibi\Strict
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod()
Dibi 4.0.1 API documentation API documentation generated by ApiGen 2.8.0