Overview

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

  • BaseStatement
  • Connection
  • Literal
  • Loader
  • Manager
  • Parser
  • Result
  • ResultIterator
  • Row
  • Statement

Interfaces

  • ICache
  • IDriver
  • IObservable
  • IObserver

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException
  • Overview
  • Namespace
  • Class
  • Tree

Interface IDriver

Interface implemented by all Neevo drivers.

All Neevo drivers must implement this interface, not only reproduce all it's methods, or they won't be recognised as valid drivers.

If something is not implemented, the method must throw Neevo\Drivers\ImplementationException. The exception will be catched and Neevo will decide, what to do next.

If something is not supported by the driver (e.g. number of result rows on unbuffered queries) the driver should throw Neevo\DriverException.

When the driver needs to rewrite default output of SQL commands, it must extend Neevo\Parser class. For proper use, see source of Neevo\Parser class.

Direct known implementers

Neevo\Drivers\MySQLDriver, Neevo\Drivers\MySQLiDriver, Neevo\Drivers\PgSQLDriver, Neevo\Drivers\SQLite2Driver, Neevo\Drivers\SQLite3Driver
Namespace: Neevo
Author: Smasty
Located at Neevo/IDriver.php
Methods summary
public
# __construct( )

Check for required PHP extension.

Check for required PHP extension.

Throws

Neevo\DriverException
public
# connect( array $config )

Create connection to database.

Create connection to database.

Parameters

$config
array
Configuration options
public
# closeConnection( )

Close the connection.

Close the connection.

public boolean
# freeResultSet( resource $resultSet )

Free memory used by given result.

Free memory used by given result.

Parameters

$resultSet
resource

Returns

boolean
public resource|boolean
# runQuery( string $queryString )

Execute given SQL statement.

Execute given SQL statement.

Parameters

$queryString
string

Returns

resource|boolean
public
# beginTransaction( string $savepoint = null )

Begin a transaction if supported.

Begin a transaction if supported.

Parameters

$savepoint
string
public
# commit( string $savepoint = null )

Commit statements in a transaction.

Commit statements in a transaction.

Parameters

$savepoint
string
$avepoint
public
# rollback( string $savepoint = null )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string
public array
# fetch( resource $resultSet )

Fetch row from given result set as an associative array.

Fetch row from given result set as an associative array.

Parameters

$resultSet
resource

Returns

array
public boolean
# seek( resource $resultSet, integer $offset )

Move internal result pointer.

Move internal result pointer.

Parameters

$resultSet
resource
$offset
integer

Returns

boolean
public integer
# getInsertId( )

Get the ID generated in the INSERT statement.

Get the ID generated in the INSERT statement.

Returns

integer
public
# randomizeOrder( Neevo\BaseStatement $statement )

Randomize result order.

Randomize result order.

Parameters

$statement
Neevo\BaseStatement
public integer|false
# getNumRows( resource $resultSet )

Get the number of rows in the given result set.

Get the number of rows in the given result set.

Parameters

$resultSet
resource

Returns

integer|false
public integer
# getAffectedRows( )

Get the number of affected rows in previous operation.

Get the number of affected rows in previous operation.

Returns

integer
public mixed
# escape( mixed $value, string $type )

Escape given value.

Escape given value.

Parameters

$value
mixed
$type
string

Returns

mixed
public mixed
# unescape( mixed $value, string $type )

Decode given value.

Decode given value.

Parameters

$value
mixed
$type
string

Returns

mixed
public string|null
# getPrimaryKey( string $table )

Get the PRIMARY KEY column for given table.

Get the PRIMARY KEY column for given table.

Parameters

$table
string

Returns

string|null
public array
# getColumnTypes( resource $resultSet, string $table )

Get types of columns in given result set.

Get types of columns in given result set.

Parameters

$resultSet
resource
$table
string

Returns

array
Neevo Public API API documentation generated by ApiGen 2.6.1