Documentation
¶
Index ¶
- type ConnAdapter
- func (c *ConnAdapter) Begin(ctx context.Context) (mrstorage.DbTransaction, error)
- func (c *ConnAdapter) Cli() *pgxpool.Pool
- func (c *ConnAdapter) Close() error
- func (c *ConnAdapter) Connect(opt Options) error
- func (c *ConnAdapter) Exec(ctx context.Context, sql string, args ...any) error
- func (c *ConnAdapter) Ping(ctx context.Context) error
- func (c *ConnAdapter) Query(ctx context.Context, sql string, args ...any) (mrstorage.DbQueryRows, error)
- func (c *ConnAdapter) QueryRow(ctx context.Context, sql string, args ...any) mrstorage.DbQueryRow
- func (c *ConnAdapter) SqExec(ctx context.Context, query mrstorage.DbSqlizer) error
- func (c *ConnAdapter) SqQuery(ctx context.Context, query mrstorage.DbSqlizer) (mrstorage.DbQueryRows, error)
- func (c *ConnAdapter) SqQueryRow(ctx context.Context, query mrstorage.DbSqlizer) mrstorage.DbQueryRow
- type Options
- type Transaction
- func (t *Transaction) Commit(ctx context.Context) error
- func (t *Transaction) Exec(ctx context.Context, sql string, args ...any) error
- func (t *Transaction) Query(ctx context.Context, sql string, args ...any) (mrstorage.DbQueryRows, error)
- func (t *Transaction) QueryRow(ctx context.Context, sql string, args ...any) mrstorage.DbQueryRow
- func (t *Transaction) Rollback(ctx context.Context) error
- func (t *Transaction) SqExec(ctx context.Context, query mrstorage.DbSqlizer) error
- func (t *Transaction) SqQuery(ctx context.Context, query mrstorage.DbSqlizer) (mrstorage.DbQueryRows, error)
- func (t *Transaction) SqQueryRow(ctx context.Context, query mrstorage.DbSqlizer) mrstorage.DbQueryRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnAdapter ¶ added in v0.3.1
type ConnAdapter struct {
// contains filtered or unexported fields
}
func New ¶
func New() *ConnAdapter
func (*ConnAdapter) Begin ¶ added in v0.3.1
func (c *ConnAdapter) Begin(ctx context.Context) (mrstorage.DbTransaction, error)
func (*ConnAdapter) Cli ¶ added in v0.3.1
func (c *ConnAdapter) Cli() *pgxpool.Pool
func (*ConnAdapter) Close ¶ added in v0.3.1
func (c *ConnAdapter) Close() error
func (*ConnAdapter) Connect ¶ added in v0.3.1
func (c *ConnAdapter) Connect(opt Options) error
func (*ConnAdapter) Query ¶ added in v0.3.1
func (c *ConnAdapter) Query(ctx context.Context, sql string, args ...any) (mrstorage.DbQueryRows, error)
func (*ConnAdapter) QueryRow ¶ added in v0.3.1
func (c *ConnAdapter) QueryRow(ctx context.Context, sql string, args ...any) mrstorage.DbQueryRow
func (*ConnAdapter) SqQuery ¶ added in v0.3.1
func (c *ConnAdapter) SqQuery(ctx context.Context, query mrstorage.DbSqlizer) (mrstorage.DbQueryRows, error)
func (*ConnAdapter) SqQueryRow ¶ added in v0.3.1
func (c *ConnAdapter) SqQueryRow(ctx context.Context, query mrstorage.DbSqlizer) mrstorage.DbQueryRow
type Transaction ¶ added in v0.4.0
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶ added in v0.4.0
func (t *Transaction) Commit(ctx context.Context) error
func (*Transaction) Query ¶ added in v0.4.0
func (t *Transaction) Query(ctx context.Context, sql string, args ...any) (mrstorage.DbQueryRows, error)
func (*Transaction) QueryRow ¶ added in v0.4.0
func (t *Transaction) QueryRow(ctx context.Context, sql string, args ...any) mrstorage.DbQueryRow
func (*Transaction) Rollback ¶ added in v0.4.0
func (t *Transaction) Rollback(ctx context.Context) error
func (*Transaction) SqQuery ¶ added in v0.4.0
func (t *Transaction) SqQuery(ctx context.Context, query mrstorage.DbSqlizer) (mrstorage.DbQueryRows, error)
func (*Transaction) SqQueryRow ¶ added in v0.4.0
func (t *Transaction) SqQueryRow(ctx context.Context, query mrstorage.DbSqlizer) mrstorage.DbQueryRow
Click to show internal directories.
Click to hide internal directories.