Documentation ¶
Index ¶
- func AutoMigrate(models ...interface{})
- func DB() *gorm.DB
- func OpenDB(dsn ResolverDSN, config *gorm.Config, maxIdleConnes, maxOpenConnes int) (err error)
- func SqlNullString(value string) sql.NullString
- type GormModel
- type OrderByCol
- type ParamPair
- type ResolverDSN
- type SqlCnd
- func (s *SqlCnd) Asc(column string) *SqlCnd
- func (s *SqlCnd) Build(db *gorm.DB) *gorm.DB
- func (s *SqlCnd) Cols(selectCols ...string) *SqlCnd
- func (s *SqlCnd) Count(db *gorm.DB, model interface{}) int64
- func (s *SqlCnd) Desc(column string) *SqlCnd
- func (s *SqlCnd) Ending(column string, str string) *SqlCnd
- func (s *SqlCnd) Eq(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) Find(db *gorm.DB, out interface{})
- func (s *SqlCnd) FindOne(db *gorm.DB, out interface{}) error
- func (s *SqlCnd) Gt(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) Gte(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) In(column string, params interface{}) *SqlCnd
- func (s *SqlCnd) Like(column string, str string) *SqlCnd
- func (s *SqlCnd) Limit(limit int) *SqlCnd
- func (s *SqlCnd) Lt(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) Lte(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) NotEq(column string, args ...interface{}) *SqlCnd
- func (s *SqlCnd) Page(page, limit int) *SqlCnd
- func (s *SqlCnd) Starting(column string, str string) *SqlCnd
- func (s *SqlCnd) Where(query string, args ...interface{}) *SqlCnd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenDB ¶
func OpenDB(dsn ResolverDSN, config *gorm.Config, maxIdleConnes, maxOpenConnes int) (err error)
func SqlNullString ¶
func SqlNullString(value string) sql.NullString
Types ¶
type ResolverDSN ¶
type SqlCnd ¶
type SqlCnd struct { SelectCols []string // 要查询的字段,如果为空,表示查询所有字段 Params []ParamPair // 参数 Orders []OrderByCol // 排序 Paging *pagination.Paging // 分页 }
Click to show internal directories.
Click to hide internal directories.