Documentation
¶
Index ¶
- Variables
- type Query
- type Result
- type Row
- type Rows
- type Table
- func (t *Table[ROW]) Del(ctx context.Context, tx TxProcessor, keys ...any) (Result, error)
- func (t *Table[ROW]) Ins(ctx context.Context, tx TxProcessor, row *ROW) (*ROW, Result, error)
- func (t *Table[ROW]) Internals() tableInternals
- func (t *Table[ROW]) Many(ctx context.Context, tx TxProcessor, filter *filter.Filter) (result []*ROW, err error)
- func (t *Table[ROW]) One(ctx context.Context, tx TxProcessor, keys ...any) (*ROW, error)
- func (t *Table[ROW]) Upd(ctx context.Context, tx TxProcessor, row *ROW) (*ROW, Result, error)
- type TxProcessor
- type TypedTable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SQLite алиас для реализации диалекта SQLite SQLite dialect.SQLiteDialect // PostgresSQL алиас для реализации диалекта PostgresSQL PostgresSQL dialect.PostgreSQLDialect )
Functions ¶
This section is empty.
Types ¶
type Query ¶
type Query[T any] struct { // contains filtered or unexported fields }
Query мульти-табличный запрос для структур с полями-ROW. EN: Query multi-table query for structs with ROW fields.
func NewQuery ¶
func NewQuery[T any](d dialect.SQLDialect) *Query[T]
NewQuery создает *Query[T]. EN: NewQuery creates *Query[T].
func NewQueryVal ¶
func NewQueryVal[T any](d dialect.SQLDialect) Query[T]
NewQueryVal создает Query[T] по значению. EN: NewQueryVal creates Query[T] by value.
func (*Query[T]) Internals ¶
func (q *Query[T]) Internals() queryInternals
Internals возвращает внутреннюю метадату Query. EN: Internals returns Query internal metadata.
type Table ¶
type Table[ROW any] struct { // contains filtered or unexported fields }
func NewTableVal ¶
func NewTableVal[ROW any](d dialect.SQLDialect) Table[ROW]
type TxProcessor ¶
type TxProcessor interface {
ExecContext(ctx context.Context, query string, args ...any) (Result, error)
QueryContext(ctx context.Context, query string, args ...any) (Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) Row
}
TxProcessor описывает интерфейс выполнения SQL-запросов.
type TypedTable ¶
type TypedTable[ROW any] interface { Ins(ctx context.Context, tx TxProcessor, row *ROW) (*ROW, Result, error) Upd(ctx context.Context, tx TxProcessor, row *ROW) (*ROW, Result, error) One(ctx context.Context, tx TxProcessor, keys ...any) (*ROW, error) Del(ctx context.Context, tx TxProcessor, keys ...any) (Result, error) Many(ctx context.Context, tx TxProcessor, filter *filter.Filter) ([]*ROW, error) }
TypedTable defines the interface for typed table implementations. Generated typed tables must implement this interface for compile-time verification.
Click to show internal directories.
Click to hide internal directories.