1 package com.github.davidmoten.rx.jdbc;
2
3 import rx.Scheduler;
4
5
6
7
8
9 final class QueryContext {
10
11 private final Database db;
12
13
14
15
16
17
18
19 QueryContext(Database db) {
20 this.db = db;
21 }
22
23
24
25
26
27
28 Scheduler scheduler() {
29 return db.currentScheduler();
30 }
31
32
33
34
35
36
37 ConnectionProvider connectionProvider() {
38 return db.connectionProvider();
39 }
40
41 void beginTransactionObserve() {
42 db.beginTransactionObserve();
43
44 }
45
46 void beginTransactionSubscribe() {
47 db.beginTransactionSubscribe();
48 }
49
50 void endTransactionSubscribe() {
51 db.endTransactionSubscribe();
52 }
53
54 void endTransactionObserve() {
55 db.endTransactionObserve();
56 }
57
58 }