Documentation
¶
Index ¶
- Variables
- func NewErrGeneral(op string, err error) error
- func NewErrModelNotFound(op, model string) error
- func NewRaw(ctx context.Context, user, password, host, name string, port uint32, ...) (*sql.DB, error)
- type PgStorage
- type PgTag
- type PgTx
- type Postgres
- func (s *Postgres) Begin(ctx context.Context, op string) (PgTx, error)
- func (s *Postgres) BeginTx(ctx context.Context, opts pgx.TxOptions, op string) (PgTx, error)
- func (s *Postgres) Check(ctx context.Context) error
- func (s *Postgres) Close(_ context.Context) error
- func (s *Postgres) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (s *Postgres) Exec(ctx context.Context, sql string, arguments ...any) (PgTag, error)
- func (s *Postgres) Query(ctx context.Context, sql string, args ...any) (rows pgx.Rows)
- func (s *Postgres) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
- type Queryable
- type Tag
- type Tx
- func (t Tx) Commit(ctx context.Context, op string) error
- func (t Tx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (t Tx) Exec(ctx context.Context, sql string, arguments ...any) (PgTag, error)
- func (t Tx) Query(ctx context.Context, sql string, args ...any) (rows pgx.Rows)
- func (t Tx) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
- func (t Tx) Rollback(ctx context.Context, op string)
- func (t Tx) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGeneral = errors.New("general storage error")
View Source
var ErrModelNotFound = errors.New("storage model not found")
Functions ¶
func NewErrGeneral ¶
func NewErrModelNotFound ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) CopyFrom ¶
func (s *Postgres) CopyFrom( ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource, ) (int64, error)
type Queryable ¶
type Queryable interface {
Query(ctx context.Context, sql string, args ...any) pgx.Rows
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
Exec(ctx context.Context, sql string, arguments ...any) (PgTag, error)
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
func (Tag) NothingUpdated ¶
func (Tag) RowsAffected ¶
Click to show internal directories.
Click to hide internal directories.