Documentation ¶
Index ¶
- Variables
- type ConnConfig
- type ConnParams
- type Migrate
- type PgxConn
- func MustNewPgxConn(config *ConnConfig, logger logger.Logger) *PgxConn
- func MustNewPgxConnPool(config *PgxConnPoolConfig, logger logger.Logger) *PgxConn
- func NewPgxConn(config *ConnConfig, logger logger.Logger) (*PgxConn, error)
- func NewPgxConnPool(config *PgxConnPoolConfig, logger logger.Logger) (*PgxConn, error)
- func (conn *PgxConn) Begin() (rdb.Tx, error)
- func (conn *PgxConn) ConnString() string
- func (conn *PgxConn) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)
- func (conn *PgxConn) Query(sql string, args ...interface{}) (rdb.RowsResult, error)
- func (conn *PgxConn) QueryRow(sql string, args ...interface{}) rdb.RowResult
- func (conn *PgxConn) ToHandle() *rdb.Handle
- type PgxConnLike
- type PgxConnPoolConfig
- type PgxLoggerAdapter
- type PgxNtobReader
- type PgxNtobfReader
- type PgxNtotReader
- type PgxRDbExecResult
- type PgxRDbRowResult
- type PgxRDbRowsResult
- type PgxRDbTx
- func (tx *PgxRDbTx) Commit() error
- func (tx *PgxRDbTx) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)
- func (tx *PgxRDbTx) Query(sql string, args ...interface{}) (rdb.RowsResult, error)
- func (tx *PgxRDbTx) QueryRow(sql string, args ...interface{}) rdb.RowResult
- func (tx *PgxRDbTx) Rollback() error
- func (tx *PgxRDbTx) ToHandle() *rdb.Handle
- type PgxTypeConv
- func (conv *PgxTypeConv) BFton(b *big.Float) interface{}
- func (conv *PgxTypeConv) Bton(b *big.Int) interface{}
- func (conv *PgxTypeConv) Iton(i int) interface{}
- func (conv *PgxTypeConv) NtobReader() rdb.NtobReader
- func (conv *PgxTypeConv) NtobfReader() rdb.NtobfReader
- func (conv *PgxTypeConv) NtotReader() rdb.NtotReader
- func (conv *PgxTypeConv) Tton(t *utctime.UTCTime) interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BIGINT_INT0 = big.NewInt(0) BIGINT_INT10 = big.NewInt(10) )
View Source
var PostgresStmtBuilder = rdb.NewStatementBuilder( sq.StatementBuilder.PlaceholderFormat(sq.Dollar), sq.Dollar, )
Functions ¶
This section is empty.
Types ¶
type ConnConfig ¶
type ConnConfig struct { Host string Port int32 MaybeUsername *string MaybePassword *string MaybeXMigrationsTable *string Database string SSL bool }
func (*ConnConfig) DeepClone ¶ added in v1.3.0
func (config *ConnConfig) DeepClone() ConnConfig
func (*ConnConfig) ToURL ¶
func (config *ConnConfig) ToURL() string
type ConnParams ¶ added in v1.3.0
type Migrate ¶
func MustNewMigrate ¶
func MustNewMigrate(config *ConnConfig, sourceFolder string) *Migrate
func NewMigrate ¶
func NewMigrate(config *ConnConfig, sourceFolder string) (*Migrate, error)
func (*Migrate) SetReCreateOnReset ¶
type PgxConn ¶
type PgxConn struct {
// contains filtered or unexported fields
}
func MustNewPgxConn ¶
func MustNewPgxConn(config *ConnConfig, logger logger.Logger) *PgxConn
func MustNewPgxConnPool ¶
func MustNewPgxConnPool(config *PgxConnPoolConfig, logger logger.Logger) *PgxConn
func NewPgxConn ¶
func NewPgxConn(config *ConnConfig, logger logger.Logger) (*PgxConn, error)
func NewPgxConnPool ¶
func NewPgxConnPool(config *PgxConnPoolConfig, logger logger.Logger) (*PgxConn, error)
func (*PgxConn) ConnString ¶ added in v1.1.0
func (*PgxConn) Exec ¶
func (conn *PgxConn) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)
func (*PgxConn) Query ¶
func (conn *PgxConn) Query(sql string, args ...interface{}) (rdb.RowsResult, error)
type PgxConnLike ¶
type PgxConnLike interface { Begin(ctx context.Context) (pgx.Tx, error) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) }
type PgxConnPoolConfig ¶
type PgxConnPoolConfig struct { ConnConfig `url:"-"` MaybeMaxConns *int32 `url:"pool_max_conns,omitempty"` MaybeMinConns *int32 `url:"pool_min_conns,omitempty"` MaybeMaxConnLifeTime *time.Duration `url:"pool_max_conn_lifetime,omitempty"` MaybeMaxConnIdleTime *time.Duration `url:"pool_max_conn_idle_time,omitempty"` MaybeHealthCheckPeriod *time.Duration `url:"pool_health_check_period,omitempty"` }
func (*PgxConnPoolConfig) ToURL ¶
func (config *PgxConnPoolConfig) ToURL() string
type PgxLoggerAdapter ¶
type PgxLoggerAdapter struct {
// contains filtered or unexported fields
}
func NewPgxLoggerAdapter ¶
func NewPgxLoggerAdapter(l logger.Logger) *PgxLoggerAdapter
type PgxNtobReader ¶
type PgxNtobReader struct {
// contains filtered or unexported fields
}
func (*PgxNtobReader) ScannableArg ¶
func (reader *PgxNtobReader) ScannableArg() interface{}
type PgxNtobfReader ¶
type PgxNtobfReader struct {
// contains filtered or unexported fields
}
func (*PgxNtobfReader) ScannableArg ¶
func (reader *PgxNtobfReader) ScannableArg() interface{}
type PgxNtotReader ¶
type PgxNtotReader struct {
// contains filtered or unexported fields
}
func NewPgxNtotReader ¶
func NewPgxNtotReader() *PgxNtotReader
func (*PgxNtotReader) ScannableArg ¶
func (reader *PgxNtotReader) ScannableArg() interface{}
type PgxRDbExecResult ¶
type PgxRDbExecResult struct {
// contains filtered or unexported fields
}
func (*PgxRDbExecResult) IsDelete ¶
func (result *PgxRDbExecResult) IsDelete() bool
func (*PgxRDbExecResult) IsInsert ¶
func (result *PgxRDbExecResult) IsInsert() bool
func (*PgxRDbExecResult) IsSelect ¶
func (result *PgxRDbExecResult) IsSelect() bool
func (*PgxRDbExecResult) IsUpdate ¶
func (result *PgxRDbExecResult) IsUpdate() bool
func (*PgxRDbExecResult) RowsAffected ¶
func (result *PgxRDbExecResult) RowsAffected() int64
func (*PgxRDbExecResult) String ¶
func (result *PgxRDbExecResult) String() string
type PgxRDbRowResult ¶
type PgxRDbRowResult struct {
// contains filtered or unexported fields
}
func (*PgxRDbRowResult) Scan ¶
func (result *PgxRDbRowResult) Scan(dest ...interface{}) error
type PgxRDbRowsResult ¶
type PgxRDbRowsResult struct {
// contains filtered or unexported fields
}
func (*PgxRDbRowsResult) Close ¶
func (result *PgxRDbRowsResult) Close()
func (*PgxRDbRowsResult) Err ¶
func (result *PgxRDbRowsResult) Err() error
func (*PgxRDbRowsResult) ExecResult ¶
func (result *PgxRDbRowsResult) ExecResult() rdb.ExecResult
func (*PgxRDbRowsResult) Next ¶
func (result *PgxRDbRowsResult) Next() bool
func (*PgxRDbRowsResult) Scan ¶
func (result *PgxRDbRowsResult) Scan(dest ...interface{}) error
type PgxRDbTx ¶
type PgxRDbTx struct {
// contains filtered or unexported fields
}
func (*PgxRDbTx) Exec ¶
func (tx *PgxRDbTx) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)
func (*PgxRDbTx) Query ¶
func (tx *PgxRDbTx) Query(sql string, args ...interface{}) (rdb.RowsResult, error)
type PgxTypeConv ¶
type PgxTypeConv struct{}
func (*PgxTypeConv) BFton ¶
func (conv *PgxTypeConv) BFton(b *big.Float) interface{}
func (*PgxTypeConv) Bton ¶
func (conv *PgxTypeConv) Bton(b *big.Int) interface{}
func (*PgxTypeConv) Iton ¶
func (conv *PgxTypeConv) Iton(i int) interface{}
func (*PgxTypeConv) NtobReader ¶
func (conv *PgxTypeConv) NtobReader() rdb.NtobReader
func (*PgxTypeConv) NtobfReader ¶
func (conv *PgxTypeConv) NtobfReader() rdb.NtobfReader
func (*PgxTypeConv) NtotReader ¶
func (conv *PgxTypeConv) NtotReader() rdb.NtotReader
func (*PgxTypeConv) Tton ¶
func (conv *PgxTypeConv) Tton(t *utctime.UTCTime) interface{}
Click to show internal directories.
Click to hide internal directories.