Accepts the transaction opened by the ds.startTransaction()
method at the corresponding level in the current context
exports all the entities stored in the object for which it is called in JSON format
exports all the entities stored the object for which it is called in SQL format
flushes the data cache to disk
returns the size of memory used by the datastore cache (in bytes)
returns a reference, Folder, to the folder containing the datastore data file
allows you to get detailed information about Wakanda database engine events
returns a reference, Folder, to the folder containing the datastore model file
returns the name of the current datastore
returns a Folder type reference to the datastore "temporary files" folder
imports all the entities stored in JSON format from the file(s) located in the importFolder folder
Pause a transaction opened by the ds.startTransaction()
method in the current context
Resume a transaction paused by the ds.pauseTransaction()
method in the current context
looks for any "ghost" tables in the data file of your application and adds the corresponding datastore classes to the loaded model
Cancels the transaction opened by the ds.startTransaction()
method at the corresponding level in the current context
increase dynamically the datastore cache size
Starts a transaction in the current context
model.Invoice.events.remove = function(){
if (this.invoiceItems.length != 0){
ds.startTransaction(); //start a transaction
this.invoiceItems.remove(); //attempt to delete the invoiceItems
// if all went well, the commit will be done automatically
// if there is an error, the transaction will rollback
}
}
Returns the level of the current transaction for the context
Number Level of the current transaction (0 if no transaction was started)
Collection of available datastore classes