Slight doc update
This commit is contained in:
@@ -585,7 +585,7 @@ func configSSL(sslmode string, cc *ConnConfig) error {
|
||||
// for bound parameters. These placeholders are referenced positional as $1, $2, etc.
|
||||
//
|
||||
// Prepare is idempotent; i.e. it is safe to call Prepare multiple times with the same
|
||||
// name and sql arguments. This allows a code path to Prepare and Query/Exec without
|
||||
// name and sql arguments. This allows a code path to Prepare and Query/Exec/Preparex without
|
||||
// concern for if the statement has already been prepared.
|
||||
func (c *Conn) Prepare(name, sql string) (ps *PreparedStatement, err error) {
|
||||
if name != "" {
|
||||
@@ -671,7 +671,7 @@ func (c *Conn) Prepare(name, sql string) (ps *PreparedStatement, err error) {
|
||||
// It defers from Prepare as it allows additional options (such as parameter OIDs) to be passed via struct
|
||||
//
|
||||
// Preparex is idempotent; i.e. it is safe to call Preparex multiple times with the same
|
||||
// name and sql arguments. This allows a code path to Preparex and Query/Exec without
|
||||
// name and sql arguments. This allows a code path to Preparex and Query/Exec/Prepare without
|
||||
// concern for if the statement has already been prepared.
|
||||
func (c *Conn) Preparex(name, sql string, opts PreparexOptions) (ps *PreparedStatement, err error) {
|
||||
if name != "" {
|
||||
|
||||
+2
-2
@@ -329,7 +329,7 @@ func (p *ConnPool) Begin() (*Tx, error) {
|
||||
//
|
||||
// Prepare is idempotent; i.e. it is safe to call Prepare multiple times with
|
||||
// the same name and sql arguments. This allows a code path to Prepare and
|
||||
// Query/Exec without concern for if the statement has already been prepared.
|
||||
// Query/Exec/Preparex without concern for if the statement has already been prepared.
|
||||
func (p *ConnPool) Prepare(name, sql string) (*PreparedStatement, error) {
|
||||
p.cond.L.Lock()
|
||||
defer p.cond.L.Unlock()
|
||||
@@ -370,7 +370,7 @@ func (p *ConnPool) Prepare(name, sql string) (*PreparedStatement, error) {
|
||||
// It defers from Prepare as it allows additional options (such as parameter OIDs) to be passed via struct
|
||||
//
|
||||
// Preparex is idempotent; i.e. it is safe to call Preparex multiple times with the same
|
||||
// name and sql arguments. This allows a code path to Preparex and Query/Exec without
|
||||
// name and sql arguments. This allows a code path to Preparex and Query/Exec/Prepare without
|
||||
// concern for if the statement has already been prepared.
|
||||
func (p *ConnPool) Preparex(name, sql string, opts PreparexOptions) (*PreparedStatement, error) {
|
||||
p.cond.L.Lock()
|
||||
|
||||
Reference in New Issue
Block a user