Packageat.db
Classpublic class TransactionBase
InheritanceTransactionBase Inheritance flash.events.EventDispatcher
SubclassesBookmarkTransaction, CallTransaction



Public Properties
 PropertyDefined by
  closeOnTransactionComplete : Boolean = true
TransactionBase
  debugMode : Boolean = false
TransactionBase
  DELETE : String = "delete"
[static]
TransactionBase
  INSERT : String = "insert"
[static]
TransactionBase
  result : SQLResult
TransactionBase
  SELECT : String = "select"
[static]
TransactionBase
  sqlQuery : String
TransactionBase
  transactionType : String
TransactionBase
  UPDATE : String = "update"
[static]
TransactionBase
Protected Properties
 PropertyDefined by
  connectToDatabase : ConnectToDatabase
TransactionBase
  dateCreated : String
TransactionBase
  dateModified : String
TransactionBase
  dbStatement : SQLStatement
TransactionBase
  eveDB : SQLConnection
TransactionBase
  eveDBFile : File
TransactionBase
  version : int = 0
TransactionBase
  whoCreated : int = 0
TransactionBase
  whoModified : int = 0
TransactionBase
Public Methods
 MethodDefined by
  
TransactionBase(target:IEventDispatcher = null)
Base class for asynchronous database transactions.
TransactionBase
  
Performs the following tasks: Opens the database, runs the transaction, and dispatches a SQLEvent.RESULT event when done.
TransactionBase
Property detail
closeOnTransactionCompleteproperty
public var closeOnTransactionComplete:Boolean = true
connectToDatabaseproperty 
protected var connectToDatabase:ConnectToDatabase
dateCreatedproperty 
protected var dateCreated:String
dateModifiedproperty 
protected var dateModified:String
dbStatementproperty 
protected var dbStatement:SQLStatement
debugModeproperty 
public var debugMode:Boolean = false
DELETEproperty 
public static var DELETE:String = "delete"
eveDBproperty 
protected var eveDB:SQLConnection
eveDBFileproperty 
protected var eveDBFile:File
INSERTproperty 
public static var INSERT:String = "insert"
resultproperty 
public var result:SQLResult
SELECTproperty 
public static var SELECT:String = "select"
sqlQueryproperty 
public var sqlQuery:String
transactionTypeproperty 
public var transactionType:String
UPDATEproperty 
public static var UPDATE:String = "update"
versionproperty 
protected var version:int = 0
whoCreatedproperty 
protected var whoCreated:int = 0
whoModifiedproperty 
protected var whoModified:int = 0
Constructor detail
TransactionBase()constructor
public function TransactionBase(target:IEventDispatcher = null)

Base class for asynchronous database transactions.

Parameters
target:IEventDispatcher (default = null)

Example
var tb:TransactionBase = new TransactionBase(); tb.transactionType = TransactionBase.SELECT; tb.sqlQuery = "SELECT title FROM tableName WHERE id = 2"; tb.addEventListener(SQLEvent.RESULT, onTransactionComplete); tb.initTransaction();

Method detail
initTransaction()method
public function initTransaction():void

Performs the following tasks: Opens the database, runs the transaction, and dispatches a SQLEvent.RESULT event when done. Note that this cannot be called if another transaction is running on the same database file. (see at.db.ConnectToDatabase)