public
|
#
__construct( string $host, string $database, string $username, string $password )
Init actions.
Parameters
- $host
- Host of the storage engine.
- $database
- Name of the database.
- $username
- Username to access the database.
- $password
- Password phrase for the user.
|
public
array|boolean
|
#
run( Core\Modules\DB\Query $query )
Run a query.
Parameters
- $query
- Current query object.
Returns
array|boolean
Implementation of
|
public
array|boolean
|
#
query( string $sql, array $bind_params = array() )
Formats a query.
Parameters
- $sql
- SQL string query.
- $bind_params
- Array of parameter values.
Returns
array|boolean
|
public
boolean
|
#
execute( string $sql, array $bind_params = array() )
Executes a query.
Parameters
- $sql
- SQL string query.
- $bind_params
- Parameter to bind.
Returns
boolean
Implementation of
|
public
boolean
|
#
setCharset( string $charset = 'utf8' )
Sets connection charset.
Parameters
Returns
boolean
Implementation of
|
public
array
|
#
getTables( string $schema )
Retrieve all tables.
Parameters
- $schema
- Schema definition.
Returns
array
Implementation of
|
public
array
|
#
getTableSchema( string $table, string $schema )
Retrieves a table schema.
Retrieves a table schema.
Parameters
- $table
- Table name.
- $schema
- Schema definition.
Returns
array
Implementation of
|
public
|
#
storeQueries( string $query, array $params = array() )
Stores a query in the cache.
Stores a query in the cache.
Parameters
- $query
- Query string.
- $params
- Query parameters.
Implementation of
|
public
integer
|
#
getLastInsertId( )
Retrieves last inserted id.
Retrieves last inserted id.
Returns
integer
Implementation of
|
public
string
|
#
escapeString( string $value )
Sanitizes string.
Parameters
- $value
- Variable to be escaped.
Returns
string
|
public
boolean
|
#
clearTable( string $table )
Purges cache.
Parameters
Returns
boolean
Implementation of
|
protected
string
|
#
buildSql( Core\Modules\DB\Query $query )
Builds a sql query.
Parameters
Returns
string
Throws
DomainException DB Adapter does not support the required JOIN type.
|
private
mysqli_stmt|false
|
#
prepare( string $sql, array $bind_params = array() )
Prepares a query for execution.
Prepares a query for execution.
Parameters
- $sql
- SQL Query.
- $bind_params
- Parameters.
Returns
mysqli_stmt|false
Throws
InvalidArgumentException The number of values passed and placeholders mismatch.
LogicException Error in the prepared statement.
|
private
array
|
#
fetchAll( mysqli_result $resource )
Fetch all rows satisfying the query.
Fetch all rows satisfying the query.
Parameters
- $resource
- Resource source.
Returns
array
|
public static
array
|
#
getSupportedJoinTypes( )
Retrieves all supported types of SQL JOIN operator.
Retrieves all supported types of SQL JOIN operator.
Returns
array
Implementation of
|