Documentation
¶
Index ¶
- func GetByID[T any](getter sqlt.Getter, table string, id any) (*T, error)
- func In(values ...any) (string, []any)
- func InString(values ...string) (string, []any)
- func InUint64(values ...uint64) (string, []any)
- func Insert(exec sqlt.Executor, table string, values map[string]any) (sql.Result, error)
- func InspectColumns(db *sql.DB, table string) ([]inspect.Column, error)
- func MakeGetByID[T any, I any](getter sqlt.Getter, table string) func(I) (*T, error)
- func MakeInsert[IN any, OUT any](exec sqlt.Executor, table string, mapIn func(IN) (map[string]any, error), ...) func(IN) (OUT, error)
- func MakeSelectByID[T any, I any](selector sqlt.Selector, table string) func(...I) ([]T, error)
- func Name(s string) string
- func SelectByID[T any](selector sqlt.Selector, table string, id ...any) (out []T, err error)
- func Update(exec sqlt.Executor, table string, values map[string]any, condition string, ...) (sql.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InspectColumns ¶ added in v1.4.0
InspectColumns reads columns data for given table
func MakeGetByID ¶
MakeGetByID constructs function that reads single entity from database
func MakeInsert ¶
func MakeInsert[IN any, OUT any]( exec sqlt.Executor, table string, mapIn func(IN) (map[string]any, error), mapOut func(sql.Result) (OUT, error), ) func(IN) (OUT, error)
MakeInsert constructs function that places values into database
func MakeSelectByID ¶
MakeSelectByID constructs function that reads multiple entities by identifiers
func SelectByID ¶
SelectByID reads multiple entities by identifiers
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.