Versions in this module Expand all Collapse all v1 v1.11.0 Apr 5, 2021 Changes in this version + const Ascending + const Descending + const Equal + const GreaterThan + const GreaterThanEqual + const IN + const JSON + const LessThan + const LessThanEqual + const Like + func CreateMigrationFiles(filename string) error + func IsDuplicate(err error) bool + func IsForeignNotFound(err error) bool + func IsInvalidInput(err error) bool + func IsNotFound(err error) bool + func Migration(data *gorm.DB) (*migrate.Migrate, error) + func TranslateQuery(db *gorm.DB, query *Query) *gorm.DB + type Config struct + Database string + DebugEnabled bool + Host string + LogMode int + MaxIdleConn int + MaxOpenConn int + Params string + Password string + Port int + Username string + func (p *Config) Client() (*gorm.DB, error) + func (p *Config) Close() error + func (p *Config) Ping() error + func (p *Config) Reset() + func (p *Config) SetDB(conn *gorm.DB) + type Filter struct + Condition string + Field string + Value interface{} + func NewFilter(field, condition string, value interface{}) *Filter + type Ordering struct + Direction string + Field string + func NewOrdering(field, direction string) *Ordering + type Query struct + Filters []*Filter + Limit int + Model string + Offset int + Orderings []*Ordering + func NewQuery(model string) *Query + func (q *Query) Filter(property, condition string, value interface{}) *Query + func (q *Query) Ordering(property, direction string) *Query + func (q *Query) Slice(offset, limit int) *Query