diff --git a/connection_pool.go b/connection_pool.go index 9ad60441..976494d2 100644 --- a/connection_pool.go +++ b/connection_pool.go @@ -89,3 +89,11 @@ func (p *ConnectionPool) SelectValues(sql string, arguments ...interface{}) (val return c.SelectValues(sql, arguments...) } + +// Execute acquires a connection, delegates the call to that connection, and releases the connection +func (p *ConnectionPool) Execute(sql string, arguments ...interface{}) (commandTag string, err error) { + c := p.Acquire() + defer p.Release(c) + + return c.Execute(sql, arguments...) +}