Documentation ¶
Index ¶
- type Client
- func (c *Client) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (c *Client) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (c *Client) Tx(ctx context.Context, callback func(ContextExecutor) error) error
- type ContextExecutor
- type Executor
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the postgres client
func (*Client) ExecContext ¶
func (c *Client) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext wraps the base connector
func (*Client) QueryContext ¶
func (c *Client) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext wraps the base connector
func (*Client) QueryRowContext ¶
QueryRowContext wraps the base connector
type ContextExecutor ¶
type ContextExecutor interface { Executor // Only to satisfy sqlboiler boil.ContextExecutor. Not to be used ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row }
ContextExecutor can perform SQL queries with context
type Executor ¶
type Executor interface { Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row }
Executor can perform SQL queries.
type Option ¶
type Option func(*Client)
func SetConnMaxLifetime ¶
func SetDebugLogLevel ¶
func SetMaxIdleConns ¶
func SetMaxOpenConns ¶
Click to show internal directories.
Click to hide internal directories.