1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | import RxResult from './result-rx'
|
20 | import RxTransaction from './transaction-rx'
|
21 | import { TransactionConfig } from 'neo4j-driver-core'
|
22 | import { Parameters } from './query-runner'
|
23 | import { Observable } from 'rxjs'
|
24 |
|
25 | declare type RxTransactionWork<T> = (tx: RxTransaction) => Observable<T>
|
26 |
|
27 | declare interface RxSession {
|
28 | run(
|
29 | query: string,
|
30 | parameters?: Parameters,
|
31 | config?: TransactionConfig
|
32 | ): RxResult
|
33 |
|
34 | beginTransaction(config?: TransactionConfig): Observable<RxTransaction>
|
35 |
|
36 | lastBookmark(): string | null
|
37 |
|
38 | readTransaction<T>(
|
39 | work: RxTransactionWork<T>,
|
40 | config?: TransactionConfig
|
41 | ): Observable<T>
|
42 |
|
43 | writeTransaction<T>(
|
44 | work: RxTransactionWork<T>,
|
45 | config?: TransactionConfig
|
46 | ): Observable<T>
|
47 |
|
48 | close(): Observable<any>
|
49 | }
|
50 |
|
51 | export default RxSession
|