Package | at.db |
Class | public class TransactionBase |
Inheritance | TransactionBase ![]() |
Subclasses | BookmarkTransaction, CallTransaction |
Property | Defined 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 |
Property | Defined 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 |
Method | Defined by | ||
---|---|---|---|
TransactionBase(target:IEventDispatcher = null)
Base class for asynchronous database transactions.
| TransactionBase | ||
initTransaction():void
Performs the following tasks: Opens the database, runs the transaction, and dispatches a
SQLEvent.RESULT event when done. | TransactionBase |
closeOnTransactionComplete | property |
public var closeOnTransactionComplete:Boolean = true
connectToDatabase | property |
protected var connectToDatabase:ConnectToDatabase
dateCreated | property |
protected var dateCreated:String
dateModified | property |
protected var dateModified:String
dbStatement | property |
protected var dbStatement:SQLStatement
debugMode | property |
public var debugMode:Boolean = false
DELETE | property |
public static var DELETE:String = "delete"
eveDB | property |
protected var eveDB:SQLConnection
eveDBFile | property |
protected var eveDBFile:File
INSERT | property |
public static var INSERT:String = "insert"
result | property |
public var result:SQLResult
SELECT | property |
public static var SELECT:String = "select"
sqlQuery | property |
public var sqlQuery:String
transactionType | property |
public var transactionType:String
UPDATE | property |
public static var UPDATE:String = "update"
version | property |
protected var version:int = 0
whoCreated | property |
protected var whoCreated:int = 0
whoModified | property |
protected var whoModified:int = 0
TransactionBase | () | constructor |
public function TransactionBase(target:IEventDispatcher = null)
Base class for asynchronous database transactions.
Parameterstarget:IEventDispatcher (default = null )
|
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();
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)