Tweak Prepare docs
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/PrepareEx without
|
// name and sql arguments. This allows a code path to Prepare and Query/Exec 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
|
||||||
//
|
//
|
||||||
// PrepareEx is idempotent; i.e. it is safe to call PrepareEx multiple times with the same
|
// PrepareEx is idempotent; i.e. it is safe to call PrepareEx multiple times with the same
|
||||||
// name and sql arguments. This allows a code path to PrepareEx and Query/Exec/Prepare without
|
// name and sql arguments. This allows a code path to PrepareEx and Query/Exec without
|
||||||
// concern for if the statement has already been prepared.
|
// concern for if the statement has already been prepared.
|
||||||
func (c *Conn) PrepareEx(name, sql string, opts PrepareExOptions) (ps *PreparedStatement, err error) {
|
func (c *Conn) PrepareEx(name, sql string, opts PrepareExOptions) (ps *PreparedStatement, err error) {
|
||||||
if name != "" {
|
if name != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user