@@ -302,6 +302,18 @@ func (connPool *ConnectionPool) Eval(expr string, args interface{}, userMode Mod
302
302
return conn .Eval (expr , args )
303
303
}
304
304
305
+ // Execute passes a sql expression to Tarantool for execution.
306
+ //
307
+ // Since 1.7.0
308
+ func (connPool * ConnectionPool ) Execute (expr string , args interface {}, userMode Mode ) (resp * tarantool.Response , err error ) {
309
+ conn , err := connPool .getNextConnection (userMode )
310
+ if err != nil {
311
+ return nil , err
312
+ }
313
+
314
+ return conn .Execute (expr , args )
315
+ }
316
+
305
317
// GetTyped performs select (with limit = 1 and offset = 0)
306
318
// to box space and fills typed result.
307
319
func (connPool * ConnectionPool ) GetTyped (space , index interface {}, key interface {}, result interface {}, userMode ... Mode ) (err error ) {
@@ -412,6 +424,18 @@ func (connPool *ConnectionPool) EvalTyped(expr string, args interface{}, result
412
424
return conn .EvalTyped (expr , args , result )
413
425
}
414
426
427
+ // ExecuteTyped passes a sql expression for execution.
428
+ //
429
+ // Since 1.7.0
430
+ func (connPool * ConnectionPool ) ExecuteTyped (expr string , args interface {}, result interface {}, userMode Mode ) (tarantool.SQLInfo , []tarantool.ColumnMetaData , error ) {
431
+ conn , err := connPool .getNextConnection (userMode )
432
+ if err != nil {
433
+ return tarantool.SQLInfo {}, nil , err
434
+ }
435
+
436
+ return conn .ExecuteTyped (expr , args , result )
437
+ }
438
+
415
439
// SelectAsync sends select request to Tarantool and returns Future.
416
440
func (connPool * ConnectionPool ) SelectAsync (space , index interface {}, offset , limit , iterator uint32 , key interface {}, userMode ... Mode ) * tarantool.Future {
417
441
conn , err := connPool .getConnByMode (ANY , userMode )
@@ -524,6 +548,18 @@ func (connPool *ConnectionPool) EvalAsync(expr string, args interface{}, userMod
524
548
return conn .EvalAsync (expr , args )
525
549
}
526
550
551
+ // ExecuteAsync passes an sql expression for execution.
552
+ //
553
+ // Since 1.7.0
554
+ func (connPool * ConnectionPool ) ExecuteAsync (expr string , args interface {}, userMode Mode ) * tarantool.Future {
555
+ conn , err := connPool .getNextConnection (userMode )
556
+ if err != nil {
557
+ return tarantool .NewErrorFuture (err )
558
+ }
559
+
560
+ return conn .ExecuteAsync (expr , args )
561
+ }
562
+
527
563
// Do sends the request and returns a response.
528
564
func (connPool * ConnectionPool ) Do (req tarantool.Request , userMode Mode ) (* tarantool.Response , error ) {
529
565
conn , err := connPool .getNextConnection (userMode )
0 commit comments