RxSession
A Reactive session, which provides the same functionality as Session but through a Reactive API.
Method Summary
| Public Methods | ||
| public |  | |
| public | beginTransaction(transactionConfig: TransactionConfig): Observable<RxTransaction> Starts a new explicit transaction with the provided transaction configuration. | |
| public | close(): Observable Closes this reactive session. | |
| public | executeRead(work: function(txc: RxManagedTransaction): Observable, transactionConfig: TransactionConfig): Observable Executes the provided unit of work in a READ reactive transaction which is created with the provided transaction configuration. | |
| public | executeWrite(work: function(txc: RxManagedTransaction): Observable, transactionConfig: TransactionConfig): Observable Executes the provided unit of work in a WRITE reactive transaction which is created with the provided transaction configuration. | |
| public | lastBookmark(): string[] this method was deprecated. This method will be removed in 6.0 version. Please, use {@link RxSession#lastBookmarks} instead. Returns the bookmarks received following the last successfully completed query, which is executed either in an RxTransaction obtained from this session instance or directly through one of the RxSession#run method of this session instance. | |
| public | lastBookmarks(): string[] Returns the bookmarks received following the last successfully completed query, which is executed either in an RxTransaction obtained from this session instance or directly through one of the RxSession#run method of this session instance. | |
| public | readTransaction(work: function(txc: RxTransaction): Observable, transactionConfig: TransactionConfig): Observable this method was deprecated. This method will be removed in version 6.0. Please, use {@link RxSession#executeRead} instead. Executes the provided unit of work in a READ reactive transaction which is created with the provided transaction configuration. | |
| public | run(query: string, parameters: Object, transactionConfig: TransactionConfig): RxResult Creates a reactive result that will execute the query with the provided parameters and the provided transaction configuration that applies to the underlying auto-commit transaction. | |
| public | writeTransaction(work: function(txc: RxTransaction): Observable, transactionConfig: TransactionConfig): Observable this method was deprecated. This method will be removed in version 6.0. Please, use {@link RxSession#executeWrite} instead. Executes the provided unit of work in a WRITE reactive transaction which is created with the provided transaction configuration. | |
Public Methods
public beginTransaction(transactionConfig: TransactionConfig): Observable<RxTransaction> source
Starts a new explicit transaction with the provided transaction configuration.
Params:
| Name | Type | Attribute | Description | 
| transactionConfig | TransactionConfig | Configuration for the new transaction. | 
Return:
| Observable<RxTransaction> | A reactive stream that will generate at most one RxTransaction instance. | 
public close(): Observable source
Closes this reactive session.
Return:
| Observable | An empty reactive stream | 
public executeRead(work: function(txc: RxManagedTransaction): Observable, transactionConfig: TransactionConfig): Observable source
Executes the provided unit of work in a READ reactive transaction which is created with the provided transaction configuration.
Params:
| Name | Type | Attribute | Description | 
| work | function(txc: RxManagedTransaction): Observable | A unit of work to be executed. | |
| transactionConfig | TransactionConfig | Configuration for the enclosing transaction created by the driver. | 
Return:
| Observable | A reactive stream returned by the unit of work. | 
public executeWrite(work: function(txc: RxManagedTransaction): Observable, transactionConfig: TransactionConfig): Observable source
Executes the provided unit of work in a WRITE reactive transaction which is created with the provided transaction configuration.
Params:
| Name | Type | Attribute | Description | 
| work | function(txc: RxManagedTransaction): Observable | A unit of work to be executed. | |
| transactionConfig | TransactionConfig | Configuration for the enclosing transaction created by the driver. | 
Return:
| Observable | A reactive stream returned by the unit of work. | 
public lastBookmark(): string[] source
Returns the bookmarks received following the last successfully completed query, which is executed either in an RxTransaction obtained from this session instance or directly through one of the RxSession#run method of this session instance.
If no bookmarks were received or if this transaction was rolled back, the bookmarks value will not be changed.
Return:
| string[] | 
public lastBookmarks(): string[] source
Returns the bookmarks received following the last successfully completed query, which is executed either in an RxTransaction obtained from this session instance or directly through one of the RxSession#run method of this session instance.
If no bookmarks were received or if this transaction was rolled back, the bookmarks value will not be changed.
Return:
| string[] | 
public readTransaction(work: function(txc: RxTransaction): Observable, transactionConfig: TransactionConfig): Observable source
Executes the provided unit of work in a READ reactive transaction which is created with the provided transaction configuration.
Params:
| Name | Type | Attribute | Description | 
| work | function(txc: RxTransaction): Observable | A unit of work to be executed. | |
| transactionConfig | TransactionConfig | Configuration for the enclosing transaction created by the driver. | 
Return:
| Observable | A reactive stream returned by the unit of work. | 
public run(query: string, parameters: Object, transactionConfig: TransactionConfig): RxResult source
Creates a reactive result that will execute the query with the provided parameters and the provided transaction configuration that applies to the underlying auto-commit transaction.
Params:
| Name | Type | Attribute | Description | 
| query | string | Query to be executed. | |
| parameters | Object | Parameter values to use in query execution. | |
| transactionConfig | TransactionConfig | Configuration for the new auto-commit transaction. | 
public writeTransaction(work: function(txc: RxTransaction): Observable, transactionConfig: TransactionConfig): Observable source
Executes the provided unit of work in a WRITE reactive transaction which is created with the provided transaction configuration.
Params:
| Name | Type | Attribute | Description | 
| work | function(txc: RxTransaction): Observable | A unit of work to be executed. | |
| transactionConfig | TransactionConfig | Configuration for the enclosing transaction created by the driver. | 
Return:
| Observable | A reactive stream returned by the unit of work. | 
 
    
  