mirror of https://github.com/jackc/pgx.git
parent
1059288751
commit
8e88d70eb3
|
@ -185,7 +185,7 @@ func TestConnQueryValuesWhenUnableToDecode(t *testing.T) {
|
||||||
defer closeConn(t, conn)
|
defer closeConn(t, conn)
|
||||||
|
|
||||||
// Note that this relies on pgtype.Record not supporting the text protocol. This seems safe as it is impossible to
|
// Note that this relies on pgtype.Record not supporting the text protocol. This seems safe as it is impossible to
|
||||||
// decode the text protocol because unlike the binary protocal there is no way to determine the OIDs of the elements.
|
// decode the text protocol because unlike the binary protocol there is no way to determine the OIDs of the elements.
|
||||||
rows, err := conn.Query(context.Background(), "select (array[1::oid], null)", pgx.QueryResultFormats{pgx.TextFormatCode})
|
rows, err := conn.Query(context.Background(), "select (array[1::oid], null)", pgx.QueryResultFormats{pgx.TextFormatCode})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
2
tx.go
2
tx.go
|
@ -88,7 +88,7 @@ func (c *Conn) BeginTx(ctx context.Context, txOptions TxOptions) (Tx, error) {
|
||||||
// Tx represents a database transaction.
|
// Tx represents a database transaction.
|
||||||
//
|
//
|
||||||
// Tx is an interface instead of a struct to enable connection pools to be implemented without relying on internal pgx
|
// Tx is an interface instead of a struct to enable connection pools to be implemented without relying on internal pgx
|
||||||
// state, to support psuedo-nested transactions with savepoints, and to allow tests to mock transactions. However,
|
// state, to support pseudo-nested transactions with savepoints, and to allow tests to mock transactions. However,
|
||||||
// adding a method to an interface is technically a breaking change. If new methods are added to Conn it may be
|
// adding a method to an interface is technically a breaking change. If new methods are added to Conn it may be
|
||||||
// desirable to add them to Tx as well. Because of this the Tx interface is partially excluded from semantic version
|
// desirable to add them to Tx as well. Because of this the Tx interface is partially excluded from semantic version
|
||||||
// requirements. Methods will not be removed or changed, but new methods may be added.
|
// requirements. Methods will not be removed or changed, but new methods may be added.
|
||||||
|
|
Loading…
Reference in New Issue