Documentation
¶
Index ¶
- Constants
- func Count[E Selectable](d DBTx, entity E, constraints string, params ...any) (int, error)
- func Delete[E Selectable](d DBTx, entity E, constraints string, params ...any) error
- func Insert(d DBTx, entity Insertable, additionalStmts ...string) error
- func InsertOrReplace(d DBTx, entity Insertable, additionalStmts ...string) error
- func InsertReturning(d DBTx, entity Insertable, retField string, retValue any) error
- func Select[E Selectable](d DBTx, entity E, constraints string, params ...any) (E, error)
- func SelectMulti[E Selectable](d DBTx, p func() E, constraints string, params ...any) ([]E, error)
- func Update(d DBTx, entity Insertable, constraints string, params ...any) error
- type DBTx
- type Entity
- type Insertable
- type Selectable
Constants ¶
View Source
const ( InsertAction = "insert" UpdateAction = "update" SelectAction = "select" )
Variables ¶
This section is empty.
Functions ¶
func InsertOrReplace ¶ added in v1.0.6
func InsertOrReplace(d DBTx, entity Insertable, additionalStmts ...string) error
func InsertReturning ¶
func InsertReturning(d DBTx, entity Insertable, retField string, retValue any) error
func Select ¶
func Select[E Selectable](d DBTx, entity E, constraints string, params ...any) (E, error)
func SelectMulti ¶
func SelectMulti[E Selectable](d DBTx, p func() E, constraints string, params ...any) ([]E, error)
Types ¶
type Insertable ¶
Click to show internal directories.
Click to hide internal directories.