zdao

package
v1.6.4-0...-ea8c640 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(names ...string) gdb.DB

* 获取 DB对象.

默认

Types

type Query

type Query struct {
	Sql  string
	Args []interface{}
	// contains filtered or unexported fields
}

func (*Query) And

func (query *Query) And(where string, args ...interface{}) *Query

func (*Query) AndDefault

func (query *Query) AndDefault(defaultWhere, where string, args ...interface{})

func (*Query) Append

func (query *Query) Append(sql string) string

func (*Query) From

func (query *Query) From(from ...interface{}) *Query

func (*Query) GroupBy

func (query *Query) GroupBy(sql string) string

func (*Query) OrderBy

func (query *Query) OrderBy(sql string) string

func (*Query) QueryValue

func (query *Query) QueryValue() *g.Var

func (*Query) Select

func (query *Query) Select(fields string) *Query

func (*Query) ToList

func (query *Query) ToList() g.List

func (*Query) ToMap

func (query *Query) ToMap() g.Map

func (*Query) ToSQL

func (query *Query) ToSQL() (string, []interface{})

func (*Query) ToStruct

func (query *Query) ToStruct(objPointer interface{}) error

func (*Query) ToStructs

func (query *Query) ToStructs(objPointerSlice interface{}) error

func (*Query) Where

func (query *Query) Where(where string, args ...interface{}) *Query

type QueryDao

type QueryDao struct {
	gdb.DB
}

func (*QueryDao) Condition

func (dao *QueryDao) Condition(sql string, objects []interface{}, data interface{}, sqlConfName, sqlConf string) (string, []interface{})

func (*QueryDao) CreateQuery

func (dao *QueryDao) CreateQuery(sql string, args ...interface{}) *Query

func (*QueryDao) Query

func (dao *QueryDao) Query(query string, args ...interface{}) g.List

func (*QueryDao) QueryEntity

func (dao *QueryDao) QueryEntity(result interface{}, query string, args ...interface{})

func (*QueryDao) QueryOne

func (dao *QueryDao) QueryOne(query string, args ...interface{}) g.Map

func (*QueryDao) QueryStruct

func (dao *QueryDao) QueryStruct(objPointer interface{}, query string, args ...interface{}) error

func (*QueryDao) QueryStructs

func (dao *QueryDao) QueryStructs(objPointerSlice interface{}, query string, args ...interface{}) error

func (*QueryDao) QueryValue

func (dao *QueryDao) QueryValue(query string, args ...interface{}) *g.Var

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL