Skip to content

Commit 4952a48

Browse files
committed
Add more docs for Conn.Query
1 parent 0648e1c commit 4952a48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

conn.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,10 @@ type QueryResultFormatsByOID map[uint32]int16
561561

562562
// Query executes sql with args. If there is an error the returned Rows will be returned in an error state. So it is
563563
// allowed to ignore the error returned from Query and handle it in Rows.
564+
//
565+
// For extra control over how the query is executed, the types QuerySimpleProtocol, QueryResultFormats, and
566+
// QueryResultFormatsByOID may be used as the first args to control exactly how the query is executed. This is rarely
567+
// needed. See the documentation for those types for details.
564568
func (c *Conn) Query(ctx context.Context, sql string, args ...interface{}) (Rows, error) {
565569
var resultFormats QueryResultFormats
566570
var resultFormatsByOID QueryResultFormatsByOID

0 commit comments

Comments
 (0)