Documentation ¶
Index ¶
- func Connect(ctx context.Context, dsnURI string) (*pgxpool.Pool, error)
- type PgDatabase
- func (p PgDatabase) Begin(ctx context.Context) (execution.TXQueryExecer, error)
- func (p PgDatabase) Close()
- func (p PgDatabase) CopyFrom(ctx context.Context, resources schema.Resources, shouldCascade bool, ...) error
- func (p PgDatabase) Delete(ctx context.Context, t *schema.Table, kvFilters []interface{}) error
- func (p PgDatabase) Dialect() schema.Dialect
- func (p PgDatabase) Exec(ctx context.Context, query string, args ...interface{}) error
- func (p PgDatabase) Insert(ctx context.Context, t *schema.Table, resources schema.Resources, ...) error
- func (p PgDatabase) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error)
- func (p PgDatabase) QueryOne(ctx context.Context, query string, args ...interface{}) pgx.Row
- func (p PgDatabase) RawCopyFrom(ctx context.Context, r io.Reader, sql string) error
- func (p PgDatabase) RawCopyTo(ctx context.Context, w io.Writer, sql string) error
- func (p PgDatabase) RemoveStaleData(ctx context.Context, t *schema.Table, executionStart time.Time, ...) error
- type PgTx
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PgDatabase ¶
type PgDatabase struct {
// contains filtered or unexported fields
}
func NewPgDatabase ¶
func (PgDatabase) Begin ¶ added in v0.10.0
func (p PgDatabase) Begin(ctx context.Context) (execution.TXQueryExecer, error)
func (PgDatabase) Close ¶
func (p PgDatabase) Close()
func (PgDatabase) CopyFrom ¶
func (p PgDatabase) CopyFrom(ctx context.Context, resources schema.Resources, shouldCascade bool, cascadeDeleteFilters map[string]interface{}) error
CopyFrom copies all resources from []*Resource
func (PgDatabase) Dialect ¶
func (p PgDatabase) Dialect() schema.Dialect
func (PgDatabase) Exec ¶
func (p PgDatabase) Exec(ctx context.Context, query string, args ...interface{}) error
Exec allows executions of postgres queries with given args returning error of execution
func (PgDatabase) Insert ¶
func (p PgDatabase) Insert(ctx context.Context, t *schema.Table, resources schema.Resources, shouldCascade bool, cascadeDeleteFilters map[string]interface{}) error
Insert inserts all resources to given table, table and resources are assumed from same table.
func (PgDatabase) Query ¶
func (p PgDatabase) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error)
Query allows execution of postgres queries with given args returning data result
func (PgDatabase) QueryOne ¶
func (p PgDatabase) QueryOne(ctx context.Context, query string, args ...interface{}) pgx.Row
QueryOne allows execution of postgres queries with given args returning data result
func (PgDatabase) RawCopyFrom ¶ added in v0.7.4
func (PgDatabase) RemoveStaleData ¶
Click to show internal directories.
Click to hide internal directories.