Add more docs for Conn.Query

pull/608/head
Jack Christensen 2019-09-10 17:35:08 -05:00
parent 0648e1c69f
commit 4952a488f2
1 changed files with 4 additions and 0 deletions

View File

@ -561,6 +561,10 @@ type QueryResultFormatsByOID map[uint32]int16
// Query executes sql with args. If there is an error the returned Rows will be returned in an error state. So it is
// allowed to ignore the error returned from Query and handle it in Rows.
//
// For extra control over how the query is executed, the types QuerySimpleProtocol, QueryResultFormats, and
// QueryResultFormatsByOID may be used as the first args to control exactly how the query is executed. This is rarely
// needed. See the documentation for those types for details.
func (c *Conn) Query(ctx context.Context, sql string, args ...interface{}) (Rows, error) {
var resultFormats QueryResultFormats
var resultFormatsByOID QueryResultFormatsByOID