Documentation
¶
Index ¶
- func LoadRelations(ctx context.Context) bool
- func SkipRelations(ctx context.Context) bool
- func WithRelations(ctx context.Context) context.Context
- func WithSkipRelations(ctx context.Context) context.Context
- type DB
- type RelationLoader
- type RelationProvider
- type Scanner
- type TableExecutor
- func (t *TableExecutor[T, C, S]) CopyFrom(ctx context.Context, db DB, values []S, fields ...C) (int64, error)
- func (t *TableExecutor[T, C, S]) Execute(ctx context.Context, db DB, query types.Buildable) (int64, error)
- func (t *TableExecutor[T, C, S]) Query(ctx context.Context, db DB, query types.Scannable) (trgs []S, err error)
- func (t *TableExecutor[T, C, S]) QueryRow(ctx context.Context, db DB, query types.Scannable) (trg S, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRelations ¶
func SkipRelations ¶
Types ¶
type DB ¶
type DB interface {
Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type RelationLoader ¶
type RelationProvider ¶
type RelationProvider[S any] interface { Relations() []RelationLoader[S] }
type Scanner ¶
type Scanner[F types.ColumnAlias] interface { GetTarget(string) func() any GetSetter(F) func() set.ValueSetter[F] GetValue(F) func() any }
type TableExecutor ¶
type TableExecutor[T types.TableAlias, C types.ColumnAlias, S Scanner[C]] struct { // contains filtered or unexported fields }
func NewTableExecutor ¶
func NewTableExecutor[T types.TableAlias, C types.ColumnAlias, S Scanner[C]]( alias T, allFields []C, scanFactory func() S, ) *TableExecutor[T, C, S]
Click to show internal directories.
Click to hide internal directories.