Documentation
¶
Index ¶
- func Exec(ctx context.Context, db DB, query string, args []interface{}) (sql.Result, error)
- func GetTable(m any) string
- func GetTableSingular(m any) string
- func Register(ctx context.Context, config Config, migrations Upper)
- func RegisterDB(ctx context.Context, db *sqlx.DB)
- func RegisterTransactions(ctx context.Context, mtx sync.Locker)
- func Value[T any](txFunc Transaction, cb func(tx *sqlx.Tx) (T, error)) (T, error)
- type Config
- type DB
- type Read
- type Tabler
- type Transaction
- type Update
- type Upper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTableSingular ¶
Types ¶
type DB ¶
type DB interface {
sqlx.QueryerContext
sqlx.ExecerContext
DriverName() string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package builder provides a fluent, chainable query builder for the database package.
|
Package builder provides a fluent, chainable query builder for the database package. |
|
Package dialects defines the query ASTs that describe SQL statements and the Dialect interface that renders them into RawQueries.
|
Package dialects defines the query ASTs that describe SQL statements and the Dialect interface that renders them into RawQueries. |
|
generic
Package generic provides a database-agnostic implementation of the dialects.Dialect interface.
|
Package generic provides a database-agnostic implementation of the dialects.Dialect interface. |
|
mysql
Package mysql implements the dialects.Dialect interface for MySQL.
|
Package mysql implements the dialects.Dialect interface for MySQL. |
|
postgres
Package postgres implements the dialects.Dialect interface for PostgreSQL.
|
Package postgres implements the dialects.Dialect interface for PostgreSQL. |
|
sqlite
Package sqlite implements the dialects.Dialect interface for SQLite.
|
Package sqlite implements the dialects.Dialect interface for SQLite. |
|
Package model defines the types and helpers for persisting and loading database records through Go structs called models.
|
Package model defines the types and helpers for persisting and loading database records through Go structs called models. |
|
Package schema provides a dialect-agnostic DSL for describing and executing database schema changes such as creating, altering, and dropping tables.
|
Package schema provides a dialect-agnostic DSL for describing and executing database schema changes such as creating, altering, and dropping tables. |
Click to show internal directories.
Click to hide internal directories.