Documentation ¶
Index ¶
- func ApplyFilters(db *gorm.DB, filters map[string]interface{}, defOp ...string) *gorm.DB
- func ApplySorts(db *gorm.DB, sorts map[string]string, defSort ...string) *gorm.DB
- func Exists(tx *gorm.DB) (exists bool)
- func WithCustomFilter(op string, opFunc OpFunc)
- func WithFilters(db *gorm.DB, req contracts.RequestContract, key ...string) *gorm.DB
- func WithSorts(db *gorm.DB, req contracts.RequestContract, key ...string) *gorm.DB
- type Date
- type Datetime
- type JsonObjString
- type OpFunc
- type Scope
- type SliceInt
- type SliceString
- type UpsertOpt
- type WithTimestamps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFilters ¶
func WithCustomFilter ¶
func WithFilters ¶
Types ¶
type Date ¶ added in v0.2.1
func (Date) MarshalJSON ¶ added in v0.2.1
func (*Date) UnmarshalJSON ¶ added in v0.2.1
type JsonObjString ¶
type JsonObjString map[string]interface{}
func (*JsonObjString) Scan ¶
func (js *JsonObjString) Scan(src any) error
Scan assigns a value from a database driver. The src value will be of one of the following types:
int64 float64 bool []byte string time.Time nil - for NULL values
An error should be returned if the value cannot be stored without loss of information.
Reference types such as []byte are only valid until the next call to Scan and should not be retained. Their underlying memory is owned by the driver. If retention is necessary, copy their values before the next call to Scan.
func (*JsonObjString) ScanInput ¶
func (js *JsonObjString) ScanInput(data []byte) error
type OpFunc ¶
func GetCustomFilter ¶
type Scope ¶
func WithUpsert ¶
type SliceString ¶
type SliceString []string
func (*SliceString) Scan ¶
func (ss *SliceString) Scan(src any) error
Scan assigns a value from a database driver. The src value will be of one of the following types:
int64 float64 bool []byte string time.Time nil - for NULL values
An error should be returned if the value cannot be stored without loss of information.
Reference types such as []byte are only valid until the next call to Scan and should not be retained. Their underlying memory is owned by the driver. If retention is necessary, copy their values before the next call to Scan.
type UpsertOpt ¶
type UpsertOpt func(clause.OnConflict) clause.OnConflict