@@ -19,11 +19,13 @@ type Future struct {
19
19
}
20
20
21
21
// Ping sends empty request to Tarantool to check connection.
22
+ //nolint: errcheck
22
23
func (conn * Connection ) Ping () (resp * Response , err error ) {
23
24
future := conn .newFuture (PingRequest )
24
25
return future .send (conn , func (enc * msgpack.Encoder ) error { enc .EncodeMapLen (0 ); return nil }).Get ()
25
26
}
26
27
28
+ //nolint: errcheck
27
29
func (req * Future ) fillSearch (enc * msgpack.Encoder , spaceNo , indexNo uint32 , key interface {}) error {
28
30
enc .EncodeUint64 (KeySpaceNo )
29
31
enc .EncodeUint64 (uint64 (spaceNo ))
@@ -33,6 +35,7 @@ func (req *Future) fillSearch(enc *msgpack.Encoder, spaceNo, indexNo uint32, key
33
35
return enc .Encode (key )
34
36
}
35
37
38
+ //nolint: errcheck
36
39
func (req * Future ) fillIterator (enc * msgpack.Encoder , offset , limit , iterator uint32 ) {
37
40
enc .EncodeUint64 (KeyIterator )
38
41
enc .EncodeUint64 (uint64 (iterator ))
@@ -42,6 +45,7 @@ func (req *Future) fillIterator(enc *msgpack.Encoder, offset, limit, iterator ui
42
45
enc .EncodeUint64 (uint64 (limit ))
43
46
}
44
47
48
+ //nolint: errcheck
45
49
func (req * Future ) fillInsert (enc * msgpack.Encoder , spaceNo uint32 , tuple interface {}) error {
46
50
enc .EncodeUint64 (KeySpaceNo )
47
51
enc .EncodeUint64 (uint64 (spaceNo ))
@@ -213,6 +217,7 @@ func (conn *Connection) EvalTyped(expr string, args interface{}, result interfac
213
217
}
214
218
215
219
// SelectAsync sends select request to Tarantool and returns Future.
220
+ //nolint: errcheck
216
221
func (conn * Connection ) SelectAsync (space , index interface {}, offset , limit , iterator uint32 , key interface {}) * Future {
217
222
future := conn .newFuture (SelectRequest )
218
223
spaceNo , indexNo , err := conn .Schema .resolveSpaceIndex (space , index )
@@ -228,6 +233,7 @@ func (conn *Connection) SelectAsync(space, index interface{}, offset, limit, ite
228
233
229
234
// InsertAsync sends insert action to Tarantool and returns Future.
230
235
// Tarantool will reject Insert when tuple with same primary key exists.
236
+ //nolint: errcheck
231
237
func (conn * Connection ) InsertAsync (space interface {}, tuple interface {}) * Future {
232
238
future := conn .newFuture (InsertRequest )
233
239
spaceNo , _ , err := conn .Schema .resolveSpaceIndex (space , nil )
@@ -242,6 +248,7 @@ func (conn *Connection) InsertAsync(space interface{}, tuple interface{}) *Futur
242
248
243
249
// ReplaceAsync sends "insert or replace" action to Tarantool and returns Future.
244
250
// If tuple with same primary key exists, it will be replaced.
251
+ //nolint: errcheck
245
252
func (conn * Connection ) ReplaceAsync (space interface {}, tuple interface {}) * Future {
246
253
future := conn .newFuture (ReplaceRequest )
247
254
spaceNo , _ , err := conn .Schema .resolveSpaceIndex (space , nil )
@@ -256,6 +263,7 @@ func (conn *Connection) ReplaceAsync(space interface{}, tuple interface{}) *Futu
256
263
257
264
// DeleteAsync sends deletion action to Tarantool and returns Future.
258
265
// Future's result will contain array with deleted tuple.
266
+ //nolint: errcheck
259
267
func (conn * Connection ) DeleteAsync (space , index interface {}, key interface {}) * Future {
260
268
future := conn .newFuture (DeleteRequest )
261
269
spaceNo , indexNo , err := conn .Schema .resolveSpaceIndex (space , index )
@@ -270,6 +278,7 @@ func (conn *Connection) DeleteAsync(space, index interface{}, key interface{}) *
270
278
271
279
// Update sends deletion of a tuple by key and returns Future.
272
280
// Future's result will contain array with updated tuple.
281
+ //nolint: errcheck
273
282
func (conn * Connection ) UpdateAsync (space , index interface {}, key , ops interface {}) * Future {
274
283
future := conn .newFuture (UpdateRequest )
275
284
spaceNo , indexNo , err := conn .Schema .resolveSpaceIndex (space , index )
@@ -288,6 +297,7 @@ func (conn *Connection) UpdateAsync(space, index interface{}, key, ops interface
288
297
289
298
// UpsertAsync sends "update or insert" action to Tarantool and returns Future.
290
299
// Future's sesult will not contain any tuple.
300
+ //nolint: errcheck
291
301
func (conn * Connection ) UpsertAsync (space interface {}, tuple interface {}, ops interface {}) * Future {
292
302
future := conn .newFuture (UpsertRequest )
293
303
spaceNo , _ , err := conn .Schema .resolveSpaceIndex (space , nil )
@@ -309,6 +319,7 @@ func (conn *Connection) UpsertAsync(space interface{}, tuple interface{}, ops in
309
319
310
320
// CallAsync sends a call to registered Tarantool function and returns Future.
311
321
// It uses request code for Tarantool 1.6, so future's result is always array of arrays
322
+ //nolint: errcheck
312
323
func (conn * Connection ) CallAsync (functionName string , args interface {}) * Future {
313
324
future := conn .newFuture (CallRequest )
314
325
return future .send (conn , func (enc * msgpack.Encoder ) error {
@@ -323,6 +334,7 @@ func (conn *Connection) CallAsync(functionName string, args interface{}) *Future
323
334
// Call17Async sends a call to registered Tarantool function and returns Future.
324
335
// It uses request code for Tarantool 1.7, so future's result will not be converted
325
336
// (though, keep in mind, result is always array)
337
+ //nolint: errcheck
326
338
func (conn * Connection ) Call17Async (functionName string , args interface {}) * Future {
327
339
future := conn .newFuture (Call17Request )
328
340
return future .send (conn , func (enc * msgpack.Encoder ) error {
@@ -335,6 +347,7 @@ func (conn *Connection) Call17Async(functionName string, args interface{}) *Futu
335
347
}
336
348
337
349
// EvalAsync sends a Lua expression for evaluation and returns Future.
350
+ //nolint: errcheck
338
351
func (conn * Connection ) EvalAsync (expr string , args interface {}) * Future {
339
352
future := conn .newFuture (EvalRequest )
340
353
return future .send (conn , func (enc * msgpack.Encoder ) error {
@@ -350,6 +363,7 @@ func (conn *Connection) EvalAsync(expr string, args interface{}) *Future {
350
363
// private
351
364
//
352
365
366
+ //nolint: errcheck
353
367
func (fut * Future ) pack (h * smallWBuf , enc * msgpack.Encoder , body func (* msgpack.Encoder ) error ) (err error ) {
354
368
rid := fut .requestId
355
369
hl := h .Len ()
0 commit comments