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.
|
// 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
|
// 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.
|
// concern for if the statement has already been prepared.
|
||||||
func (c *Conn) Prepare(name, sql string) (ps *PreparedStatement, err error) {
|
func (c *Conn) Prepare(name, sql string) (ps *PreparedStatement, err error) {
|
||||||
if name != "" {
|
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
|
// 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
|
// 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.
|
// concern for if the statement has already been prepared.
|
||||||
func (c *Conn) Preparex(name, sql string, opts PreparexOptions) (ps *PreparedStatement, err error) {
|
func (c *Conn) Preparex(name, sql string, opts PreparexOptions) (ps *PreparedStatement, err error) {
|
||||||
if name != "" {
|
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
|
// 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
|
// 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) {
|
func (p *ConnPool) Prepare(name, sql string) (*PreparedStatement, error) {
|
||||||
p.cond.L.Lock()
|
p.cond.L.Lock()
|
||||||
defer p.cond.L.Unlock()
|
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
|
// 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
|
// 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.
|
// concern for if the statement has already been prepared.
|
||||||
func (p *ConnPool) Preparex(name, sql string, opts PreparexOptions) (*PreparedStatement, error) {
|
func (p *ConnPool) Preparex(name, sql string, opts PreparexOptions) (*PreparedStatement, error) {
|
||||||
p.cond.L.Lock()
|
p.cond.L.Lock()
|
||||||
|
|||||||
Reference in New Issue
Block a user