RxTransaction
A reactive transaction, which provides the same functionality as Transaction but through a Reactive API.
Method Summary
Public Methods | ||
public |
close(): Observable Closes the transaction |
|
public |
commit(): Observable Commits the transaction. |
|
public |
isOpen(): boolean Check if this transaction is active, which means commit and rollback did not happen. |
|
public |
rollback(): Observable Rolls back the transaction. |
|
public |
Creates a reactive result that will execute the query in this transaction, with the provided parameters. |
Public Methods
public close(): Observable source
Closes the transaction
This method will roll back the transaction if it is not already committed or rolled back.
Return:
Observable | An empty observable |
public isOpen(): boolean source
Check if this transaction is active, which means commit and rollback did not happen.
Return:
boolean |
|
public rollback(): Observable source
Rolls back the transaction.
Return:
Observable | An empty observable |
public run(query: string, parameters: Object): RxResult source
Creates a reactive result that will execute the query in this transaction, with the provided parameters.
Params:
Name | Type | Attribute | Description |
query | string | Query to be executed. |
|
parameters | Object | Parameter values to use in query execution. |