Class nnjl.licurgo.Transaction
Defined in: nnjl.licurgo.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new nnjl.licurgo.Transaction
|
| Field Attributes | Field Name and Description |
|---|---|
|
Datasource associated to this transaction
|
|
|
All the nnjl.licurgo.Transaction Statements that will be executed in the transaction
|
| Method Attributes | Method Name and Description |
|---|---|
|
commit(callback)
Execute the transaction.
|
|
|
remove(dao, table)
Generate nnjl.licurgo.TransactionStatement to remove the nnjl.licurgo.DataObject
|
|
|
removeById(typeName, key, table)
Generate nnjl.licurgo.TransactionStatement to remove the nnjl.licurgo.DataObject by its primary key
|
|
|
save(dao, table)
Generate nnjl.licurgo.TransactionStatement to save the nnjl.licurgo.DataObject
|
Class Detail
nnjl.licurgo.Transaction(ds)
Creates a new nnjl.licurgo.Transaction
- Parameters:
- {Datasource} ds
- Datasource associated to this transaction
Field Detail
{Datasource}
ds
Datasource associated to this transaction
{nnjl.licurgo.TransactionStatement[]}
statements
All the nnjl.licurgo.Transaction Statements that will be executed in the transaction
Method Detail
commit(callback)
Execute the transaction. If any of the nnjl.licurgo.TransactionStatement cause an exception, a rollback will be executed, otherwise a commit.
- Parameters:
- {Function} callback
- Function that will be executed when the transaction end. The number of executed statements will be pased by param.
remove(dao, table)
Generate nnjl.licurgo.TransactionStatement to remove the nnjl.licurgo.DataObject
- Parameters:
- {DataObject} dao
- {String} table Optional
removeById(typeName, key, table)
Generate nnjl.licurgo.TransactionStatement to remove the nnjl.licurgo.DataObject by its primary key
- Parameters:
- {String} typeName
- {Object} key
- {String} table Optional
save(dao, table)
Generate nnjl.licurgo.TransactionStatement to save the nnjl.licurgo.DataObject
- Parameters:
- {DataObject} dao
- {String} table Optional