Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectQuery ¶ added in v1.2.0
Expects a SQL query in any form: simple, prepared, or anonymous.
func ExpectTerminate ¶ added in v1.2.0
func MockMigrationHistory ¶ added in v1.133.3
func MockMigrationHistory(conn *MockConn)
Types ¶
type MockConn ¶
type MockConn struct {
// contains filtered or unexported fields
}
func NewWithStatus ¶
func (*MockConn) Intercept ¶
func (r *MockConn) Intercept(config *pgx.ConnConfig)
Configures pgx to use the mock dialer.
The mock dialer provides a full duplex net.Conn backed by an in-memory buffer. It is implemented by grcp/test/bufconn package.
func (*MockConn) Reply ¶
Adds a server reply using text protocol format.
TODO: support binary protocol
func (*MockConn) ReplyError ¶
Simulates an error reply from the server.
TODO: simulate a notice reply
Click to show internal directories.
Click to hide internal directories.