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
-
Neevo\Drivers\MySQLDriver
implements
Neevo\DriverInterface
Methods summary
public
|
#
__construct( Neevo\BaseStatement $statement = null )
Checks for required PHP extension.
Checks for required PHP extension.
Parameters
Throws
Overrides
Implementation of
|
public
|
#
connect( array $config )
Creates connection to database.
Creates connection to database.
Parameters
- $config
array $config Configuration options
Throws
Implementation of
|
public
|
|
public
boolean
|
#
freeResultSet( resource $resultSet )
Frees memory used by given result set.
Frees memory used by given result set.
Parameters
- $resultSet
resource $resultSet
Returns
boolean
Implementation of
|
public
resource|boolean
|
#
runQuery( string $queryString )
Executes given SQL statement.
Executes given SQL statement.
Parameters
- $queryString
string $queryString
Returns
resource|boolean
Throws
Implementation of
|
public
|
#
beginTransaction( string $savepoint = null )
Begins a transaction if supported.
Begins a transaction if supported.
Parameters
- $savepoint
string $savepoint
Implementation of
|
public
|
#
commit( string $savepoint = null )
Commits statements in a transaction.
Commits statements in a transaction.
Parameters
- $savepoint
string $savepoint
Implementation of
|
public
|
#
rollback( string $savepoint = null )
Rollback changes in a transaction.
Rollback changes in a transaction.
Parameters
- $savepoint
string $savepoint
Implementation of
|
public
array
|
#
fetch( resource $resultSet )
Fetches row from given result set as an associative array.
Fetches row from given result set as an associative array.
Parameters
- $resultSet
resource $resultSet
Returns
array
Implementation of
|
public
boolean
|
#
seek( resource $resultSet, integer $offset )
Moves internal result pointer.
Moves internal result pointer.
Parameters
- $resultSet
resource $resultSet
- $offset
integer $offset
Returns
boolean
Throws
Implementation of
|
public
integer
|
#
getInsertId( )
Returns the ID generated in the INSERT statement.
Returns the ID generated in the INSERT statement.
Returns
integer
Implementation of
|
public
|
|
public
integer|boolean
|
#
getNumRows( resource $resultSet )
Returns the number of rows in the given result set.
Returns the number of rows in the given result set.
Parameters
- $resultSet
resource $resultSet
Returns
integer|boolean
Throws
Implementation of
|
public
integer
|
#
getAffectedRows( )
Returns the number of affected rows in previous operation.
Returns the number of affected rows in previous operation.
Returns
integer
Implementation of
|
public
mixed
|
#
escape( mixed $value, string $type )
Escapes given value.
Parameters
- $value
mixed $value
- $type
string $type
Returns
mixed
Throws
Implementation of
|
public
mixed
|
#
unescape( mixed $value, string $type )
Decodes given value.
Parameters
- $value
mixed $value
- $type
string $type
Returns
mixed
Throws
Implementation of
|
public
string
|
#
getPrimaryKey( string $table )
Returns the PRIMARY KEY column for given table.
Returns the PRIMARY KEY column for given table.
Parameters
Returns
string
Implementation of
|
public
array
|
#
getColumnTypes( resource $resultSet, string $table )
Returns types of columns in given result set.
Returns types of columns in given result set.
Parameters
- $resultSet
resource $resultSet
- $table
string $table
Returns
array
Implementation of
|
protected
string
|
|
protected
string
|
|
applyLimit()
,
applyModifiers()
,
escapeValue()
,
parse()
,
parseFieldName()
,
parseGrouping()
,
parseInsertStmt()
,
parseSelectStmt()
,
parseSorting()
,
parseSource()
,
parseWhere()
,
tryDelimite()
Magic methods summary
Properties summary
Properties inherited from Neevo\Parser
$clauses
,
$stmt