Skip to content

Commit e47a27a

Browse files
committed
code health: move NewPrepared to public code block
Part of #208
1 parent e8e04e5 commit e47a27a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

connection_pool/connection_pool.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,15 @@ func (connPool *ConnectionPool) NewStream(userMode Mode) (*tarantool.Stream, err
558558
return conn.NewStream()
559559
}
560560

561+
// NewPrepared passes a sql statement to Tarantool for preparation synchronously.
562+
func (connPool *ConnectionPool) NewPrepared(expr string, userMode Mode) (*tarantool.Prepared, error) {
563+
conn, err := connPool.getNextConnection(userMode)
564+
if err != nil {
565+
return nil, err
566+
}
567+
return conn.NewPrepared(expr)
568+
}
569+
561570
//
562571
// private
563572
//
@@ -812,12 +821,3 @@ func newErrorFuture(err error) *tarantool.Future {
812821
fut.SetError(err)
813822
return fut
814823
}
815-
816-
// NewPrepared passes a sql statement to Tarantool for preparation synchronously.
817-
func (connPool *ConnectionPool) NewPrepared(expr string, userMode Mode) (*tarantool.Prepared, error) {
818-
conn, err := connPool.getNextConnection(userMode)
819-
if err != nil {
820-
return nil, err
821-
}
822-
return conn.NewPrepared(expr)
823-
}

0 commit comments

Comments
 (0)