Documentation ¶
Index ¶
- func ObtainLock(dbox DbBox) (bool, error)
- func ReleaseLock(dbox DbBox) (bool, error)
- type DbBox
- func (dbox DbBox) Exec(qb QueryBox, args ...any) (sql.Result, error)
- func (dbox DbBox) ExecMaybeTx(query string, transaction bool) error
- func (dbox DbBox) GetQuery(qb QueryBox) string
- func (dbox DbBox) Query(qb QueryBox, args ...any) (*sql.Rows, error)
- func (dbox DbBox) QueryRow(qb QueryBox, args ...any) *sql.Row
- type QueryBox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObtainLock ¶
func ReleaseLock ¶
Types ¶
type DbBox ¶ added in v0.2.1
type DbBox struct { Db *sql.DB Type string // TODO: Make this lowercase IsPostgres bool // indicates this connection is for PostgreSQL IsMysql bool // indicates this connection is for MySQL IsSqlite bool // indicates this connection is for Sqlite }
func (DbBox) ExecMaybeTx ¶ added in v0.3.1
This is a convenience wrapper around running up and down transaction queries
Click to show internal directories.
Click to hide internal directories.