forked from tarantool/go-tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
export_test.go
122 lines (101 loc) · 3.85 KB
/
export_test.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
package tarantool
import (
"io"
"net"
"time"
)
func SslDialTimeout(network, address string, timeout time.Duration,
opts SslOpts) (connection net.Conn, err error) {
return sslDialTimeout(network, address, timeout, opts)
}
func SslCreateContext(opts SslOpts) (ctx interface{}, err error) {
return sslCreateContext(opts)
}
// RefImplPingBody is reference implementation for filling of a ping
// request's body.
func RefImplPingBody(enc *encoder) error {
return fillPing(enc)
}
// RefImplSelectBody is reference implementation for filling of a select
// request's body.
func RefImplSelectBody(enc *encoder, space, index, offset, limit, iterator uint32, key interface{}) error {
return fillSelect(enc, space, index, offset, limit, iterator, key)
}
// RefImplInsertBody is reference implementation for filling of an insert
// request's body.
func RefImplInsertBody(enc *encoder, space uint32, tuple interface{}) error {
return fillInsert(enc, space, tuple)
}
// RefImplReplaceBody is reference implementation for filling of a replace
// request's body.
func RefImplReplaceBody(enc *encoder, space uint32, tuple interface{}) error {
return fillInsert(enc, space, tuple)
}
// RefImplDeleteBody is reference implementation for filling of a delete
// request's body.
func RefImplDeleteBody(enc *encoder, space, index uint32, key interface{}) error {
return fillDelete(enc, space, index, key)
}
// RefImplUpdateBody is reference implementation for filling of an update
// request's body.
func RefImplUpdateBody(enc *encoder, space, index uint32, key, ops interface{}) error {
return fillUpdate(enc, space, index, key, ops)
}
// RefImplUpsertBody is reference implementation for filling of an upsert
// request's body.
func RefImplUpsertBody(enc *encoder, space uint32, tuple, ops interface{}) error {
return fillUpsert(enc, space, tuple, ops)
}
// RefImplCallBody is reference implementation for filling of a call or call17
// request's body.
func RefImplCallBody(enc *encoder, function string, args interface{}) error {
return fillCall(enc, function, args)
}
// RefImplEvalBody is reference implementation for filling of an eval
// request's body.
func RefImplEvalBody(enc *encoder, expr string, args interface{}) error {
return fillEval(enc, expr, args)
}
// RefImplExecuteBody is reference implementation for filling of an execute
// request's body.
func RefImplExecuteBody(enc *encoder, expr string, args interface{}) error {
return fillExecute(enc, expr, args)
}
// RefImplPrepareBody is reference implementation for filling of an prepare
// request's body.
func RefImplPrepareBody(enc *encoder, expr string) error {
return fillPrepare(enc, expr)
}
// RefImplUnprepareBody is reference implementation for filling of an execute prepared
// request's body.
func RefImplExecutePreparedBody(enc *encoder, stmt Prepared, args interface{}) error {
return fillExecutePrepared(enc, stmt, args)
}
// RefImplUnprepareBody is reference implementation for filling of an unprepare
// request's body.
func RefImplUnprepareBody(enc *encoder, stmt Prepared) error {
return fillUnprepare(enc, stmt)
}
// RefImplBeginBody is reference implementation for filling of an begin
// request's body.
func RefImplBeginBody(enc *encoder, txnIsolation TxnIsolationLevel, timeout time.Duration) error {
return fillBegin(enc, txnIsolation, timeout)
}
// RefImplCommitBody is reference implementation for filling of an commit
// request's body.
func RefImplCommitBody(enc *encoder) error {
return fillCommit(enc)
}
// RefImplRollbackBody is reference implementation for filling of an rollback
// request's body.
func RefImplRollbackBody(enc *encoder) error {
return fillRollback(enc)
}
// RefImplIdBody is reference implementation for filling of an id
// request's body.
func RefImplIdBody(enc *encoder, protocolInfo ProtocolInfo) error {
return fillId(enc, protocolInfo)
}
func NewEncoder(w io.Writer) *encoder {
return newEncoder(w)
}