Neevo MySQLi driver (PHP extension 'mysqli')
Driver configuration: - host => MySQL server name or address - port (int)
=> MySQL server port - socket - username - password - database => database
to select - charset => Character encoding to set (defaults to utf8) -
peristent (bool) => Try to find a persistent link - unbuffered (bool) =>
Sends query without fetching and buffering the result
- resource (instance of mysqli) => Existing MySQLi link - lazy,
table_prefix... => see Neevo\Connection
Methods summary
public
|
#
__construct( Neevo\BaseStatement $statement = null )
Check for required PHP extension.
Check for required PHP extension.
Parameters
Throws
|
public
|
#
connect( array $config )
Create connection to database.
Create connection to database.
Parameters
- $config
array Configuration options
Throws
Implementation of
|
public
|
#
closeConnection( )
Close the connection.
Implementation of
|
public
boolean
|
#
freeResultSet( mysqli_result $resultSet )
Free memory used by given result set.
Free memory used by given result set.
Parameters
Returns
boolean
Implementation of
|
public
mysqli_result|boolean
|
#
runQuery( string $queryString )
Execute given SQL statement.
Execute given SQL statement.
Parameters
Returns
Throws
Implementation of
|
public
|
#
beginTransaction( string $savepoint = null )
Begin a transaction if supported.
Begin a transaction if supported.
Parameters
Implementation of
|
public
|
#
commit( string $savepoint = null )
Commit statements in a transaction.
Commit statements in a transaction.
Parameters
Implementation of
|
public
|
#
rollback( string $savepoint = null )
Rollback changes in a transaction.
Rollback changes in a transaction.
Parameters
Implementation of
|
public
array
|
#
fetch( mysqli_result $resultSet )
Fetch row from given result set as an associative array.
Fetch row from given result set as an associative array.
Parameters
Returns
array
Implementation of
|
public
boolean
|
#
seek( mysqli_result $resultSet, integer $offset )
Move internal result pointer.
Move internal result pointer.
Parameters
Returns
boolean
Throws
Implementation of
|
public
integer
|
#
getInsertId( )
Get the ID generated in the INSERT statement.
Get the ID generated in the INSERT statement.
Returns
integer
Implementation of
|
public
|
#
randomizeOrder( Neevo\BaseStatement $statement )
Randomize result order.
Parameters
Implementation of
|
public
integer|false
|
#
getNumRows( mysqli_result $resultSet )
Get the number of rows in the given result set.
Get the number of rows in the given result set.
Parameters
Returns
integer|false
Throws
Implementation of
|
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
|
public
mixed
|
#
escape( mixed $value, string $type )
Escape given value.
Parameters
- $value
mixed
- $type
string
Returns
mixed
Throws
Implementation of
|
public
mixed
|
#
unescape( mixed $value, string $type )
Decode given value.
Parameters
- $value
mixed
- $type
string
Returns
mixed
Throws
Implementation of
|
public
string
|
#
getPrimaryKey( string $table )
Get the PRIMARY KEY column for given table.
Get the PRIMARY KEY column for given table.
Parameters
Returns
string
Implementation of
|
public
array
|
#
getColumnTypes( mysqli_result $resultSet, string $table )
Get types of columns in given result set.
Get types of columns in given result set.
Parameters
Returns
array
Implementation of
|
protected
string
|
#
parseUpdateStmt( )
Parse UPDATE statement.
Returns
string
|
protected
string
|
#
parseDeleteStmt( )
Parse DELETE statement.
Returns
string
|