Documentation ¶
Index ¶
- Variables
- func DeleteFromDB(ctx context.Context, db *sqlx.DB, storables ...Storable) error
- func ExecBoilerplate(action string, storable Storable) (boilerplate string)
- func InsertIntoDB(ctx context.Context, db *sqlx.DB, storables ...Storable) error
- func SQLColumns(s Storable) (cols []string)
- func SQLValues(s Storable) (vals []driver.Value)
- func UpdateIntoDB(ctx context.Context, db *sqlx.DB, storables ...Storable) error
- func UpsertIntoDB(ctx context.Context, db *sqlx.DB, storables ...Storable) error
- func Where(ctx context.Context, db *sqlx.DB, storable Storable, whereClause string, ...) *sqlx.Row
- func WhereMany(ctx context.Context, db *sqlx.DB, storable Storable, whereClause string, ...) (*sqlx.Rows, error)
- type PqErr
- type Storable
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoId = errors.New("storable entity given has no id")
Functions ¶
func DeleteFromDB ¶
func ExecBoilerplate ¶ added in v1.5.6
func InsertIntoDB ¶
InsertIntoDB inserts the storable entity to the DB Finally, it assigns the inserted Id to the given entities
func SQLColumns ¶
func UpdateIntoDB ¶
func UpsertIntoDB ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.