@@ -11,28 +11,28 @@ import (
11
11
)
12
12
13
13
func fillSearch (enc * msgpack.Encoder , spaceNo , indexNo uint32 , key interface {}) error {
14
- enc .EncodeUint64 (KeySpaceNo )
15
- enc .EncodeUint64 ( uint64 (spaceNo ))
16
- enc .EncodeUint64 (KeyIndexNo )
17
- enc .EncodeUint64 ( uint64 (indexNo ))
18
- enc .EncodeUint64 (KeyKey )
14
+ enc .EncodeUint (KeySpaceNo )
15
+ enc .EncodeUint ( uint (spaceNo ))
16
+ enc .EncodeUint (KeyIndexNo )
17
+ enc .EncodeUint ( uint (indexNo ))
18
+ enc .EncodeUint (KeyKey )
19
19
return enc .Encode (key )
20
20
}
21
21
22
22
func fillIterator (enc * msgpack.Encoder , offset , limit , iterator uint32 ) {
23
- enc .EncodeUint64 (KeyIterator )
24
- enc .EncodeUint64 ( uint64 (iterator ))
25
- enc .EncodeUint64 (KeyOffset )
26
- enc .EncodeUint64 ( uint64 (offset ))
27
- enc .EncodeUint64 (KeyLimit )
28
- enc .EncodeUint64 ( uint64 (limit ))
23
+ enc .EncodeUint (KeyIterator )
24
+ enc .EncodeUint ( uint (iterator ))
25
+ enc .EncodeUint (KeyOffset )
26
+ enc .EncodeUint ( uint (offset ))
27
+ enc .EncodeUint (KeyLimit )
28
+ enc .EncodeUint ( uint (limit ))
29
29
}
30
30
31
31
func fillInsert (enc * msgpack.Encoder , spaceNo uint32 , tuple interface {}) error {
32
32
enc .EncodeMapLen (2 )
33
- enc .EncodeUint64 (KeySpaceNo )
34
- enc .EncodeUint64 ( uint64 (spaceNo ))
35
- enc .EncodeUint64 (KeyTuple )
33
+ enc .EncodeUint (KeySpaceNo )
34
+ enc .EncodeUint ( uint (spaceNo ))
35
+ enc .EncodeUint (KeyTuple )
36
36
return enc .Encode (tuple )
37
37
}
38
38
@@ -47,19 +47,19 @@ func fillUpdate(enc *msgpack.Encoder, spaceNo, indexNo uint32, key, ops interfac
47
47
if err := fillSearch (enc , spaceNo , indexNo , key ); err != nil {
48
48
return err
49
49
}
50
- enc .EncodeUint64 (KeyTuple )
50
+ enc .EncodeUint (KeyTuple )
51
51
return enc .Encode (ops )
52
52
}
53
53
54
54
func fillUpsert (enc * msgpack.Encoder , spaceNo uint32 , tuple , ops interface {}) error {
55
55
enc .EncodeMapLen (3 )
56
- enc .EncodeUint64 (KeySpaceNo )
57
- enc .EncodeUint64 ( uint64 (spaceNo ))
58
- enc .EncodeUint64 (KeyTuple )
56
+ enc .EncodeUint (KeySpaceNo )
57
+ enc .EncodeUint ( uint (spaceNo ))
58
+ enc .EncodeUint (KeyTuple )
59
59
if err := enc .Encode (tuple ); err != nil {
60
60
return err
61
61
}
62
- enc .EncodeUint64 (KeyDefTuple )
62
+ enc .EncodeUint (KeyDefTuple )
63
63
return enc .Encode (ops )
64
64
}
65
65
@@ -70,25 +70,25 @@ func fillDelete(enc *msgpack.Encoder, spaceNo, indexNo uint32, key interface{})
70
70
71
71
func fillCall (enc * msgpack.Encoder , functionName string , args interface {}) error {
72
72
enc .EncodeMapLen (2 )
73
- enc .EncodeUint64 (KeyFunctionName )
73
+ enc .EncodeUint (KeyFunctionName )
74
74
enc .EncodeString (functionName )
75
- enc .EncodeUint64 (KeyTuple )
75
+ enc .EncodeUint (KeyTuple )
76
76
return enc .Encode (args )
77
77
}
78
78
79
79
func fillEval (enc * msgpack.Encoder , expr string , args interface {}) error {
80
80
enc .EncodeMapLen (2 )
81
- enc .EncodeUint64 (KeyExpression )
81
+ enc .EncodeUint (KeyExpression )
82
82
enc .EncodeString (expr )
83
- enc .EncodeUint64 (KeyTuple )
83
+ enc .EncodeUint (KeyTuple )
84
84
return enc .Encode (args )
85
85
}
86
86
87
87
func fillExecute (enc * msgpack.Encoder , expr string , args interface {}) error {
88
88
enc .EncodeMapLen (2 )
89
- enc .EncodeUint64 (KeySQLText )
89
+ enc .EncodeUint (KeySQLText )
90
90
enc .EncodeString (expr )
91
- enc .EncodeUint64 (KeySQLBind )
91
+ enc .EncodeUint (KeySQLBind )
92
92
return encodeSQLBind (enc , args )
93
93
}
94
94
0 commit comments