Packageat.db.sql
Classpublic class TransactionQueue

This class is the heart of the SQLEngine's queued SQL transaction. It basically accepts ISQLStatements and pushes them into an array. The array is processed one by one (FIFO) until the queue is empty.



Public Properties
 PropertyDefined by
  debugMode : Boolean = false
[static] Enables debugging output
TransactionQueue
Public Methods
 MethodDefined by
  
TransactionQueue(pConnection:Connection, sqlEngine:SQLEngine)
Constructor.
TransactionQueue
  
addTransaction(sqlStatement:ISQLStatement, resultHandler:Function = null, async:Boolean = false):void
This method adds the transaction to the queue and if it not currently executing then it begins the transaction loop.
TransactionQueue
Protected Methods
 MethodDefined by
  
checkExecuteMode(async:Boolean):Boolean
Check to see if the database is the correct mode for execution.
TransactionQueue
Property detail
debugModeproperty
public static var debugMode:Boolean = false

Enables debugging output

Constructor detail
TransactionQueue()constructor
public function TransactionQueue(pConnection:Connection, sqlEngine:SQLEngine)

Constructor.

Parameters
pConnection:Connection
 
sqlEngine:SQLEngine
Method detail
addTransaction()method
public function addTransaction(sqlStatement:ISQLStatement, resultHandler:Function = null, async:Boolean = false):void

This method adds the transaction to the queue and if it not currently executing then it begins the transaction loop. Otherwise, it simply pushes the statement to the queue to be processed.

Parameters
sqlStatement:ISQLStatement — The ISQLStatement that you would like pushed on to the queue.
 
resultHandler:Function (default = null) — Upon completion of the ISQLStatement a function can be executed.
 
async:Boolean (default = false) — Tells the TransactionQueue whether it should process the ISQLStatement in asynchronous mode.
checkExecuteMode()method 
protected function checkExecuteMode(async:Boolean):Boolean

Check to see if the database is the correct mode for execution. If it is not it will go ahead and change the database mode.

Parameters
async:Boolean — If true, check for asynchronous mode.

Returns
Boolean — True if database is in correct execution mode.