Documentation
¶
Index ¶
- Constants
- func Conditions(db *gorm.DB, conditions *selection_condition.SelectionCondition) *gorm.DB
- func Limit(db *gorm.DB, value uint) *gorm.DB
- func Offset(db *gorm.DB, value uint) *gorm.DB
- func SortOrder(db *gorm.DB, orders []map[string]string) *gorm.DB
- func Where(db *gorm.DB, conditions interface{}) *gorm.DB
- func WhereCondition(db *gorm.DB, condition selection_condition.WhereCondition) *gorm.DB
- func WhereConditions(db *gorm.DB, conditions selection_condition.WhereConditions) *gorm.DB
- type Config
- type DB
- func (db *DB) Close() error
- func (db *DB) DB() *gorm.DB
- func (db *DB) GormTx(gormDB *gorm.DB) *gorm.DB
- func (db *DB) IsAutoMigrate() bool
- func (db *DB) Model(value interface{}) (*DB, error)
- func (db *DB) ModelWithContext(ctx context.Context, model interface{}) (*DB, error)
- func (db *DB) SchemeInit(model interface{}) (*DB, error)
- func (db *DB) SchemeInitWithContext(ctx context.Context, model interface{}) (*DB, error)
- func (db *DB) WithContext(ctx context.Context) *DB
- type IDB
- type LogConfig
Constants ¶
View Source
const DefaultLimit = 1000
Variables ¶
This section is empty.
Functions ¶
func Conditions ¶
func Conditions(db *gorm.DB, conditions *selection_condition.SelectionCondition) *gorm.DB
func WhereCondition ¶
func WhereCondition(db *gorm.DB, condition selection_condition.WhereCondition) *gorm.DB
func WhereConditions ¶
func WhereConditions(db *gorm.DB, conditions selection_condition.WhereConditions) *gorm.DB
Types ¶
type DB ¶
DB is the struct for a DB connection
func (*DB) IsAutoMigrate ¶
func (*DB) ModelWithContext ¶ added in v0.0.10
func (*DB) SchemeInit ¶ added in v0.0.11
func (*DB) SchemeInitWithContext ¶ added in v0.0.11
type IDB ¶
type IDB interface { DB() *gorm.DB Close() error IsAutoMigrate() bool Model(value interface{}) (*DB, error) WithContext(ctx context.Context) *DB ModelWithContext(ctx context.Context, model interface{}) (*DB, error) SchemeInit(model interface{}) (*DB, error) SchemeInitWithContext(ctx context.Context, model interface{}) (*DB, error) GormTx(gormDB *gorm.DB) *gorm.DB }
IDB is the interface for a DB connection
Click to show internal directories.
Click to hide internal directories.