Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConnBusy = errors.New("conn is busy")
ErrConnBusy occurs when the connection is busy (for example, in the middle of reading query results) and another action is attempts.
var ErrDeadConn = errors.New("conn is dead")
ErrDeadConn occurs on an attempt to use a dead connection
var ErrInvalidLogLevel = pgx.ErrInvalidLogLevel
ErrInvalidLogLevel occurs on attempt to set an invalid log level.
var ErrNoRows = pgx.ErrNoRows
ErrNoRows occurs when rows are expected but none are returned.
var ErrNotificationTimeout = errors.New("notification timeout")
ErrNotificationTimeout occurs when WaitForNotification times out.
var ErrTLSRefused = errors.New("server refused TLS connection")
ErrTLSRefused occurs when the connection attempt requires TLS and the PostgreSQL server refuses to use TLS
Functions ¶
This section is empty.
Types ¶
type CopyFromSource ¶
type CopyFromSource pgx.CopyFromSource
CopyFromSource is the interface used by *Conn.CopyFrom as the source for copy data.
func CopyFromRows ¶
func CopyFromRows(rows [][]interface{}) CopyFromSource
CopyFromRows returns a CopyFromSource interface over the provided rows slice making it usable by *Conn.CopyFrom.
type Identifier ¶
type Identifier pgx.Identifier
Identifier a PostgreSQL identifier or name. Identifiers can be composed of multiple parts such as ["schema", "table"] or ["table", "column"].
type Mocker ¶
type Mocker interface { PGXer QueriesRun() []onedb.MethodsRun SaveMethodCall(name string, arguments []interface{}) VerifyNextCommand(t *testing.T, name string, expected ...interface{}) }
Mocker is the interface for mocking and includes all of the PGXer interface plus 3 methods to make testing easier
type Oid ¶
type Oid uint32
Oid (Object Identifier Type) is, according to https://www.postgresql.org/docs/current/static/datatype-oid.html, used internally by PostgreSQL as a primary key for various system tables. It is currently implemented as an unsigned four-byte integer. Its definition can be found in src/include/postgres_ext.h in the PostgreSQL sources.
type PGXQuerier ¶
type ProtocolError ¶
type ProtocolError string
ProtocolError occurs when unexpected data is received from PostgreSQL
type Rower ¶
type Rower interface { Err() error FieldDescriptions() []pgproto3.FieldDescription Next() bool onedb.Scanner Values() ([]interface{}, error) Columns() ([]string, error) // added }
Rower is the public interface for all the capability found in a *pgx.Rows. Note that the Close method returns an error similar to how database/sql's rows Close returns and error