Documentation
¶
Index ¶
- Constants
- func Migrate(database Database, files common.VirtualFS) error
- func QueryRecord[Shape any](database Database, tx *sql.Tx, query string, params ...any) (*Shape, error)
- func QueryRecords[Shape any](database Database, tx *sql.Tx, query string, params ...any) ([]*Shape, error)
- func Record[Record any](rows *sql.Rows) (*Record, error)
- func Records[Record any](rows *sql.Rows) ([]*Record, error)
- func Tx[A any](database Database, handler func(*sql.Tx) (*A, error)) (*A, error)
- func TxStub(database Database, handler func(*sql.Tx) error) error
- type Database
- type Query
Constants ¶
View Source
const (
DatabaseSqlite = "uniond_sqlite_driver"
)
Variables ¶
This section is empty.
Functions ¶
func QueryRecord ¶
func QueryRecords ¶
Types ¶
type Database ¶
type Database interface {
Name() string
Query(tx *sql.Tx, query string, args ...any) (*sql.Rows, error)
Exec(tx *sql.Tx, query string, args ...any) (sql.Result, error)
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.