Versions in this module Expand all Collapse all v0 v0.0.3 Mar 7, 2021 v0.0.2 Feb 17, 2021 Changes in this version + var ErrFieldNotFound = errors.New("field not found") + var ErrInvalidJoinType = errors.New("invalid join type") + type BaseRecord struct + func (record *BaseRecord) IsPersisted() bool + func (record *BaseRecord) IsWritable() bool + func (record *BaseRecord) TableName() string + type BaseTxRunner struct + func (tx *BaseTxRunner) Commit(ctx context.Context) error + func (tx *BaseTxRunner) Exec(ctx context.Context, query string, args ...interface{}) (pgconn.CommandTag, error) + func (tx *BaseTxRunner) Prepare(ctx context.Context, name, query string) (*pgconn.StatementDescription, error) + func (tx *BaseTxRunner) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + func (tx *BaseTxRunner) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error) + func (tx *BaseTxRunner) QueryRow(ctx context.Context, query string, args ...interface{}) pgx.Row + func (tx *BaseTxRunner) Rollback(ctx context.Context) error + type ConnectionPgx interface + Begin func(ctx context.Context) (TxPgxProxy, error) + BeginTx func(ctx context.Context, opts pgx.TxOptions) (TxPgxProxy, error) + Builder func() sqlf.Builder + DB func() PgxDBProxy + func NewConnectionPgx(db PgxDBProxy, builder sqlf.Builder) ConnectionPgx + type DefaultScoper interface + DefaultScope func() error + type HookAfterDelete interface + AfterDelete func(ctx context.Context, err error) + type HookAfterInsert interface + AfterInsert func(ctx context.Context, err error, fields ...SchemaField) + type HookAfterSave interface + AfterSave func(ctx context.Context, err error, fields ...SchemaField) + type HookAfterUpdate interface + AfterUpdate func(ctx context.Context, err error, fields ...SchemaField) + type HookBeforeDelete interface + BeforeDelete func(ctx context.Context) error + type HookBeforeInsert interface + BeforeInsert func(ctx context.Context, fields ...SchemaField) error + type HookBeforeSave interface + BeforeSave func(ctx context.Context, fields ...SchemaField) error + type HookBeforeUpdate interface + BeforeUpdate func(ctx context.Context, fields ...SchemaField) error + type JoinType int + const FullJoin + const InnerJoin + const JoinNone + const LeftJoin + const OuterJoin + const RightJoin + func (t JoinType) String() string + type PgxDBProxy interface + Begin func(ctx context.Context) (pgx.Tx, error) + BeginTx func(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + type PgxDBRunner interface + type PgxExecer interface + Exec func(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) + type PgxPreparer interface + Prepare func(ctx context.Context, name, sql string) (sd *pgconn.StatementDescription, err error) + type PgxQueryer interface + Query func(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error) + QueryFunc func(ctx context.Context, sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error) + type PgxRowQueryer interface + QueryRow func(ctx context.Context, sql string, args ...interface{}) pgx.Row + type Query interface + AddSelect func(fields ...SchemaField) + From func(schema Schema) + FullJoin func(schema Schema, condition string, params ...interface{}) + GetSelect func() []SchemaField + GroupBy func(fields ...interface{}) + GroupByX func(func(sqlf.GroupBy)) + InnerJoin func(schema Schema, condition string, params ...interface{}) + Join func(joinType JoinType, schema Schema, condition string, params ...interface{}) + LeftJoin func(schema Schema, condition string, params ...interface{}) + Limit func(limit int) + OrderBy func(fields ...interface{}) + OrderByX func(f func(sqlf.OrderBy)) + RightJoin func(schema Schema, condition string, params ...interface{}) + Select func(fields ...SchemaField) + Skip func(skip int) + Where func(condition string, params ...interface{}) + WhereCriteria func(conditions ...sqlf.FastSqlizer) + func NewQuery(conn ConnectionPgx, schema Schema) Query + type Record interface + GetID func() interface{} + IsPersisted func() bool + IsWritable func() bool + TableName func() string + type ResultSet interface + Err func() error + Next func() bool + Scan func(args ...interface{}) error + type ResultSetPgx interface + Close func() + FieldDescriptions func() []pgproto3.FieldDescription + type Schema interface + Alias func() string + As func(alias string) Schema + Columns func() []SchemaField + Table func() string + func NewSchema(table string, fields ...SchemaField) Schema + type SchemaField interface + Name func() string + QualifiedName func(Schema) string + func NewSchemaField(name string) SchemaField + type TxPgxProxy interface + Commit func(context.Context) error + Rollback func(context.Context) error + func NewPgxTx(tx pgx.Tx) TxPgxProxy