Overview

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

  • MySQLDriver
  • MySQLiDriver
  • PgSQLDriver
  • SQLite2Driver
  • SQLite3Driver
  • Overview
  • Namespace
  • Class
  • Tree

Class MySQLDriver

Neevo MySQL driver (PHP extension 'mysql')

Driver configuration: - host => MySQL server name or address - port (int) => MySQL server port - username - password - database => database to select - charset => Character encoding to set (defaults to utf8) - persistent (bool) => Try to find a persistent link - unbuffered (bool) => Sends query without fetching and buffering the result
- resource (type resource) => Existing MySQL link - lazy, table_prefix... => see Neevo\Connection

Neevo\Parser
Extended by Neevo\Drivers\MySQLDriver implements Neevo\IDriver
Namespace: Neevo\Drivers
Author: Smasty
Located at Neevo/Drivers/mysql.php
Methods summary
public
# __construct( Neevo\BaseStatement $statement = null )

Check for required PHP extension.

Check for required PHP extension.

Parameters

$statement
BaseStatement

Throws

Neevo\DriverException
public
# connect( array $config )

Create connection to database.

Create connection to database.

Parameters

$config
array
Configuration options

Throws

Neevo\DriverException

Implementation of

Neevo\IDriver::connect
public
# closeConnection( )

Close the connection.

Close the connection.

Implementation of

Neevo\IDriver::closeConnection
public boolean
# freeResultSet( resource $resultSet )

Free memory used by given result set.

Free memory used by given result set.

Parameters

$resultSet
resource

Returns

boolean

Implementation of

Neevo\IDriver::freeResultSet
public resource|boolean
# runQuery( string $queryString )

Execute given SQL statement.

Execute given SQL statement.

Parameters

$queryString
string

Returns

resource|boolean

Throws

Neevo\DriverException

Implementation of

Neevo\IDriver::runQuery
public
# beginTransaction( string $savepoint = null )

Begin a transaction if supported.

Begin a transaction if supported.

Parameters

$savepoint
string

Implementation of

Neevo\IDriver::beginTransaction
public
# commit( string $savepoint = null )

Commit statements in a transaction.

Commit statements in a transaction.

Parameters

$savepoint
string

Implementation of

Neevo\IDriver::commit
public
# rollback( string $savepoint = null )

Rollback changes in a transaction.

Rollback changes in a transaction.

Parameters

$savepoint
string

Implementation of

Neevo\IDriver::rollback
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

Implementation of

Neevo\IDriver::fetch
public boolean
# seek( resource $resultSet, integer $offset )

Move internal result pointer.

Move internal result pointer.

Parameters

$resultSet
resource
$offset
integer

Returns

boolean

Throws

Neevo\DriverException

Implementation of

Neevo\IDriver::seek
public integer
# getInsertId( )

Get the ID generated in the INSERT statement.

Get the ID generated in the INSERT statement.

Returns

integer

Implementation of

Neevo\IDriver::getInsertId
public
# randomizeOrder( Neevo\BaseStatement $statement )

Randomize result order.

Randomize result order.

Parameters

$statement
Neevo\BaseStatement

Implementation of

Neevo\IDriver::randomizeOrder
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

Throws

Neevo\DriverException

Implementation of

Neevo\IDriver::getNumRows
public integer
# getAffectedRows( )

Get the number of affected rows in previous operation.

Get the number of affected rows in previous operation.

Returns

integer

Implementation of

Neevo\IDriver::getAffectedRows
public mixed
# escape( mixed $value, string $type )

Escape given value.

Escape given value.

Parameters

$value
mixed
$type
string

Returns

mixed

Throws

InvalidArgumentException

Implementation of

Neevo\IDriver::escape
public mixed
# unescape( mixed $value, string $type )

Decode given value.

Decode given value.

Parameters

$value
mixed
$type
string

Returns

mixed

Throws

InvalidArgumentException

Implementation of

Neevo\IDriver::unescape
public string
# getPrimaryKey( string $table )

Get the PRIMARY KEY column for given table.

Get the PRIMARY KEY column for given table.

Parameters

$table
string

Returns

string

Implementation of

Neevo\IDriver::getPrimaryKey
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

Implementation of

Neevo\IDriver::getColumnTypes
protected string
# parseUpdateStmt( )

Parse UPDATE statement.

Parse UPDATE statement.

Returns

string
protected string
# parseDeleteStmt( )

Parse DELETE statement.

Parse DELETE statement.

Returns

string
Methods inherited from Neevo\Parser
applyLimit(), applyModifiers(), escapeValue(), parse(), parseFieldName(), parseGrouping(), parseInsertStmt(), parseSelectStmt(), parseSorting(), parseSource(), parseWhere(), tryDelimite()
Properties inherited from Neevo\Parser
$clauses, $stmt
Neevo Public API API documentation generated by ApiGen 2.6.1