Documentation ¶
Index ¶
- func DB(names ...string) gdb.DB
- type CommonDao
- func (da *CommonDao[T]) Fetch(where map[string]interface{}) *T
- func (da *CommonDao[T]) GetList(where map[string]interface{}, orderBy ...string) []*T
- func (da *CommonDao[T]) GetPage(where map[string]interface{}, page, size int, orderBy ...string) PageResult[T]
- func (da *CommonDao[T]) Insert(data *T) (result interface{}, err error)
- func (da *CommonDao[T]) Update(data *T, where map[string]interface{}) (result interface{}, err error)
- func (da *CommonDao[T]) UpdateMap(data map[string]interface{}, where map[string]interface{}) (result interface{}, err error)
- type PageResult
- type Query
- func (query *Query) And(where string, args ...interface{}) *Query
- func (query *Query) AndDefault(defaultWhere, where string, args ...interface{})
- func (query *Query) Append(sql string) string
- func (query *Query) Eq(column string, args interface{}) *Query
- func (query *Query) From(from ...interface{}) *Query
- func (query *Query) GroupBy(sql string) string
- func (query *Query) In(column string, args interface{}) *Query
- func (query *Query) Like(column string, args interface{}) *Query
- func (query *Query) Limit(start, num int) string
- func (query *Query) OrderBy(sql string) string
- func (query *Query) QueryValue() *g.Var
- func (query *Query) Select(fields string) *Query
- func (query *Query) ToList() g.List
- func (query *Query) ToMap() g.Map
- func (query *Query) ToSQL() (string, []interface{})
- func (query *Query) ToStruct(objPointer interface{}) error
- func (query *Query) ToStructs(objPointerSlice interface{}) error
- func (query *Query) Where(where string, args ...interface{}) *Query
- type QueryDao
- func (dao *QueryDao) Condition(sql string, objects []interface{}, data interface{}, ...) (string, []interface{})
- func (dao *QueryDao) CreateQuery(sql string, args ...interface{}) *Query
- func (dao *QueryDao) Query(query string, args ...interface{}) g.List
- func (dao *QueryDao) QueryEntity(result interface{}, query string, args ...interface{})
- func (dao *QueryDao) QueryOne(query string, args ...interface{}) g.Map
- func (dao *QueryDao) QueryStruct(objPointer interface{}, query string, args ...interface{}) error
- func (dao *QueryDao) QueryStructs(objPointerSlice interface{}, query string, args ...interface{}) error
- func (dao *QueryDao) QueryValue(query string, args ...interface{}) *g.Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonDao ¶ added in v1.9.7
func (*CommonDao[T]) GetPage ¶ added in v1.9.7
func (da *CommonDao[T]) GetPage(where map[string]interface{}, page, size int, orderBy ...string) PageResult[T]
type PageResult ¶ added in v1.9.10
type Query ¶
type Query struct { Sql string Args []interface{} // contains filtered or unexported fields }
func (*Query) AndDefault ¶ added in v1.3.1117
func (*Query) QueryValue ¶ added in v1.6.2
type QueryDao ¶
func (*QueryDao) CreateQuery ¶
func (*QueryDao) QueryEntity ¶
func (*QueryDao) QueryStruct ¶ added in v1.3.1029
func (*QueryDao) QueryStructs ¶ added in v1.3.1029
Click to show internal directories.
Click to hide internal directories.