forked from tarantool/go-tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connector.go
129 lines (123 loc) · 6.79 KB
/
connector.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package tarantool
import "time"
// Doer is an interface that performs requests asynchronously.
type Doer interface {
// Do performs a request asynchronously.
Do(req Request) (fut *Future)
}
type Connector interface {
Doer
ConnectedNow() bool
Close() error
ConfiguredTimeout() time.Duration
NewPrepared(expr string) (*Prepared, error)
NewStream() (*Stream, error)
NewWatcher(key string, callback WatchCallback) (Watcher, error)
// Deprecated: the method will be removed in the next major version,
// use a PingRequest object + Do() instead.
Ping() ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a SelectRequest object + Do() instead.
Select(space, index interface{}, offset, limit uint32, iterator Iter,
key interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use an InsertRequest object + Do() instead.
Insert(space interface{}, tuple interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a ReplicaRequest object + Do() instead.
Replace(space interface{}, tuple interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a DeleteRequest object + Do() instead.
Delete(space, index interface{}, key interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a UpdateRequest object + Do() instead.
Update(space, index interface{}, key interface{}, ops *Operations) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a UpsertRequest object + Do() instead.
Upsert(space interface{}, tuple interface{}, ops *Operations) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a CallRequest object + Do() instead.
Call(functionName string, args interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a Call16Request object + Do() instead.
Call16(functionName string, args interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a Call17Request object + Do() instead.
Call17(functionName string, args interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use an EvalRequest object + Do() instead.
Eval(expr string, args interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use an ExecuteRequest object + Do() instead.
Execute(expr string, args interface{}) ([]interface{}, error)
// Deprecated: the method will be removed in the next major version,
// use a SelectRequest object + Do() instead.
GetTyped(space, index interface{}, key interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a SelectRequest object + Do() instead.
SelectTyped(space, index interface{}, offset, limit uint32, iterator Iter, key interface{},
result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use an InsertRequest object + Do() instead.
InsertTyped(space interface{}, tuple interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a ReplaceRequest object + Do() instead.
ReplaceTyped(space interface{}, tuple interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a DeleteRequest object + Do() instead.
DeleteTyped(space, index interface{}, key interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a UpdateRequest object + Do() instead.
UpdateTyped(space, index interface{}, key interface{}, ops *Operations,
result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a CallRequest object + Do() instead.
CallTyped(functionName string, args interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a Call16Request object + Do() instead.
Call16Typed(functionName string, args interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use a Call17Request object + Do() instead.
Call17Typed(functionName string, args interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use an EvalRequest object + Do() instead.
EvalTyped(expr string, args interface{}, result interface{}) error
// Deprecated: the method will be removed in the next major version,
// use an ExecuteRequest object + Do() instead.
ExecuteTyped(expr string, args interface{},
result interface{}) (SQLInfo, []ColumnMetaData, error)
// Deprecated: the method will be removed in the next major version,
// use a SelectRequest object + Do() instead.
SelectAsync(space, index interface{}, offset, limit uint32, iterator Iter,
key interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use an InsertRequest object + Do() instead.
InsertAsync(space interface{}, tuple interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use a ReplaceRequest object + Do() instead.
ReplaceAsync(space interface{}, tuple interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use a DeleteRequest object + Do() instead.
DeleteAsync(space, index interface{}, key interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use a UpdateRequest object + Do() instead.
UpdateAsync(space, index interface{}, key interface{}, ops *Operations) *Future
// Deprecated: the method will be removed in the next major version,
// use a UpsertRequest object + Do() instead.
UpsertAsync(space interface{}, tuple interface{}, ops *Operations) *Future
// Deprecated: the method will be removed in the next major version,
// use a CallRequest object + Do() instead.
CallAsync(functionName string, args interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use a Call16Request object + Do() instead.
Call16Async(functionName string, args interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use a Call17Request object + Do() instead.
Call17Async(functionName string, args interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use an EvalRequest object + Do() instead.
EvalAsync(expr string, args interface{}) *Future
// Deprecated: the method will be removed in the next major version,
// use an ExecuteRequest object + Do() instead.
ExecuteAsync(expr string, args interface{}) *Future
}