Implementation of an adapter using the mySQL functions.

see \global\WebLab_Data_Adapter
author Jorgen Evens
package WebLab
subpackage Data

 Methods

Default constructor for creating a Adapter.

__construct(mixed $config) 

Parameters

$config

mixed

Escape text using the adapters native escaping functionality.

escape_string(string $str) 

Parameters

$str

string

Get database specific information.

getAdapterSpecification() : object

This returns a reference to escape_string() and the wildcard.

see \$_wildcard
see \escape_string()
see \getAdapterSpecs()

Returns

object

Get database specific information.

getAdapterSpecs() : object

This returns a reference to escape_string() and the wildcard.

see \escape_string()
see \$_wildcard

Returns

object

Return the prefix for this database.

getPrefix() : string

Returns

string

Returns the last inserted id.

insert_id() : mixed

Returns

mixed

Returns the state of the adapter.

isConnected() : boolean

Returns

boolean

Generate a new query of the correct type.

newQuery() : \WebLab_Data_Query

Performs a query.

query(string $query) 

Prefixes the query tables if a prefix is specified.

Parameters

$query

string

Decrease transaction depth.

quitTransaction(boolean $commit) 

When transaction depth reaches 0 transaction will be commited.

When performing a rollback, transaction depth will be reset to 0 and the entire tree will be rolled back.

Parameters

$commit

boolean

Set the prefix used while querying this database.

setPrefix(string $prefix) : \WebLab_Data_Adapter

Parameters

$prefix

string

Returns

Start a transaction and increase the transaction depth

startTransaction() 

Perform querying logic.

_query(string $query) 

Parameters

$query

string

Quit a transaction using database specific commands.

_quit_transaction(boolean $commit) 

Parameters

$commit

boolean

Start a transaction using database specific commands.

_start_transaction() 

 Properties

 

$error : string
 

$_original_strings : array
 

$_prefix : string
 

$_resource : resource
 

$_transaction_depth : int

This allows for transaction nesting.

see \startTransaction()
 

$_wildcard : string