Class AwlDatabase

Description

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

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

AwlDBDialect
   |
   --AwlDatabase
Variable Summary
 mixed $txnstate
Method Summary
 void Begin ()
 void Commit ()
 void ErrorInfo ()
 void prepare ( $statement, [array $driver_options = array()], string $sql_query_string)
 void query ( $statement, string $sql_query_string, mixed 1)
 void Rollback ()
 void TranslateAll ( $onoff_boolean)
Variables
mixed $txnstate = 0 (line 63)

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 90)

Begin a transaction.

void Begin ()
Commit (line 105)

Complete a transaction.

void Commit ()
ErrorInfo (line 157)
void ErrorInfo ()
prepare (line 72)

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 142)

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

void PrepareTranslated ()
query (line 82)

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 117)

Cancel a transaction in progress.

void Rollback ()
TransactionState (line 133)

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 150)

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::ReplaceParameters()
 AwlDBDialect::SetSearchPath()
 AwlDBDialect::TranslateSQL()

Documentation generated on Tue, 09 Mar 2010 10:08:41 +1300 by phpDocumentor 1.3.2