## AwlDatabase

Description

Typically there will only be a single instance of the database level class in an application.

Located in /inc/AwlDatabase.php (line 58)

    AwlDBDialect
       |
       --AwlDatabase

Variable Summary
mixed $translate_all
mixed $txnstate
Method Summary
void Begin ()
void Commit ()
void ErrorInfo ()
void prepare ( $statement, [array $driver_options = array()], string $sql_query_string)
void PrepareTranslated ( $statement, [ $driver_options = array()])
void query ( $statement, string $sql_query_string, mixed 1)
void Rollback ()
void TransactionState ()
void TranslateAll ( $onoff_boolean)
Variables
mixed $translate_all = false (line 71)

Holds whether we are translating all statements.

- access: protected

mixed $txnstate = 0 (line 66)

Holds the state of the transaction 0 = not started, 1 = in progress, -1 = error pending rollback/commit

- access: protected

#### Inherited Variables

Inherited from AwlDBDialect

> AwlDBDialect::$db
> AwlDBDialect::$dialect

Methods
Begin (line 101)

Begin a transaction.

void Begin ()
Commit (line 116)

Complete a transaction.

void Commit ()
ErrorInfo (line 172)
void ErrorInfo ()
prepare (line 80)

Returns a PDOStatement object created using this database, the supplied SQL string, and any parameters given.

void prepare ( $statement, [array $driver_options = array()], string $sql_query_string)

- string $sql_query_string: The SQL string containing optional variable replacements
- array $driver_options: PDO driver options to the prepare statement, commonly to do with cursors
- $statement

PrepareTranslated (line 153)

Operates identically to AwlDatabase::Prepare, except that $this->Translate() will be called on the query before any processing.

void PrepareTranslated ( $statement, [ $driver_options = array()])

- $statement
- $driver_options

query (line 93)

Returns a PDOStatement object created using this database, the supplied SQL string, and any parameters given.

void query ( $statement, string $sql_query_string, mixed 1)

- string $sql_query_string: The SQL string containing optional variable replacements
- mixed 1: ... Subsequent arguments are positionally replaced into the $sql_query_string
- $statement

Rollback (line 128)

Cancel a transaction in progress.

void Rollback ()
TransactionState (line 144)

Returns the current state of a transaction, indicating if we have begun a transaction, whether the transaction has failed, or if we are not in a transaction.

void TransactionState ()
TranslateAll (line 163)

Switches on or off the processing flag controlling whether subsequent calls to AwlDatabase::Prepare are translated as if PrepareTranslated() had been called.

void TranslateAll ( $onoff_boolean)

- $onoff_boolean

#### Inherited Methods

Inherited From AwlDBDialect

> AwlDBDialect::__construct()
> AwlDBDialect::GetFields()
> AwlDBDialect::GetVersion()
> AwlDBDialect::Quote()
> AwlDBDialect::ReplaceNamedParameters()
> AwlDBDialect::ReplaceParameters()
> AwlDBDialect::SetSearchPath()
> AwlDBDialect::TranslateSQL()

Documentation generated on Sat, 17 Apr 2010 12:32:22 +1200 by phpDocumentor 1.3.2