Documentation
¶
Index ¶
- func DBMap(columns []string, rows *sql.Rows) ([]interface{}, error)
- func QueryForMaps(sql string, mapping map[string]string, args ...interface{}) ([]interface{}, error)
- func QueryForMapsByInterface(query Query) (interface{}, error)
- type GPA
- type GPAUtil
- type Query
- type SimpleQuery
- func (this SimpleQuery) Args() []interface{}
- func (this SimpleQuery) First() bool
- func (this SimpleQuery) Get() interface{}
- func (this SimpleQuery) Key() string
- func (this SimpleQuery) Mapping() map[string]string
- func (this SimpleQuery) Sql() string
- func (this SimpleQuery) WithArgs(args ...interface{}) *SimpleQueryWithArgs
- func (this SimpleQuery) WithFirst() *SimpleQueryWithArgs
- func (this SimpleQuery) WithKey(key string) *SimpleQueryWithArgs
- func (this SimpleQuery) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
- type SimpleQueryWithArgs
- func NewSimpleQueryWithArgs(sql string, args []interface{}) *SimpleQueryWithArgs
- func NewSimpleQueryWithFetchFirst(sql string) *SimpleQueryWithArgs
- func NewSimpleQueryWithKey(sql string, key string) *SimpleQueryWithArgs
- func NewSimpleQueryWithMapping(sql string, mapping map[string]string) *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) Args() []interface{}
- func (this *SimpleQueryWithArgs) First() bool
- func (this *SimpleQueryWithArgs) Get() interface{}
- func (this *SimpleQueryWithArgs) Key() string
- func (this *SimpleQueryWithArgs) Mapping() map[string]string
- func (this *SimpleQueryWithArgs) Sql() string
- func (this *SimpleQueryWithArgs) WithFirst() *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) WithKey(key string) *SimpleQueryWithArgs
- func (this *SimpleQueryWithArgs) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryForMaps ¶
func QueryForMapsByInterface ¶
Types ¶
type GPAUtil ¶
type GPAUtil struct {
GDB GPA `inject:"-"`
}
func NewGPAUtil ¶
func NewGPAUtil() *GPAUtil
type Query ¶
type Query interface { Sql() string Args() []interface{} Mapping() map[string]string First() bool Key() string Get() interface{} }
sql返回值解析
type SimpleQuery ¶
type SimpleQuery string
func (SimpleQuery) Args ¶
func (this SimpleQuery) Args() []interface{}
func (SimpleQuery) First ¶
func (this SimpleQuery) First() bool
func (SimpleQuery) Get ¶
func (this SimpleQuery) Get() interface{}
func (SimpleQuery) Key ¶
func (this SimpleQuery) Key() string
func (SimpleQuery) Mapping ¶
func (this SimpleQuery) Mapping() map[string]string
func (SimpleQuery) Sql ¶
func (this SimpleQuery) Sql() string
func (SimpleQuery) WithArgs ¶
func (this SimpleQuery) WithArgs(args ...interface{}) *SimpleQueryWithArgs
func (SimpleQuery) WithFirst ¶
func (this SimpleQuery) WithFirst() *SimpleQueryWithArgs
func (SimpleQuery) WithKey ¶
func (this SimpleQuery) WithKey(key string) *SimpleQueryWithArgs
func (SimpleQuery) WithMapping ¶
func (this SimpleQuery) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
type SimpleQueryWithArgs ¶
type SimpleQueryWithArgs struct {
// contains filtered or unexported fields
}
func NewSimpleQueryWithArgs ¶
func NewSimpleQueryWithArgs(sql string, args []interface{}) *SimpleQueryWithArgs
func NewSimpleQueryWithFetchFirst ¶
func NewSimpleQueryWithFetchFirst(sql string) *SimpleQueryWithArgs
func NewSimpleQueryWithKey ¶
func NewSimpleQueryWithKey(sql string, key string) *SimpleQueryWithArgs
func NewSimpleQueryWithMapping ¶
func NewSimpleQueryWithMapping(sql string, mapping map[string]string) *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) Args ¶
func (this *SimpleQueryWithArgs) Args() []interface{}
func (*SimpleQueryWithArgs) First ¶
func (this *SimpleQueryWithArgs) First() bool
func (*SimpleQueryWithArgs) Get ¶
func (this *SimpleQueryWithArgs) Get() interface{}
func (*SimpleQueryWithArgs) Key ¶
func (this *SimpleQueryWithArgs) Key() string
func (*SimpleQueryWithArgs) Mapping ¶
func (this *SimpleQueryWithArgs) Mapping() map[string]string
func (*SimpleQueryWithArgs) Sql ¶
func (this *SimpleQueryWithArgs) Sql() string
func (*SimpleQueryWithArgs) WithFirst ¶
func (this *SimpleQueryWithArgs) WithFirst() *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) WithKey ¶
func (this *SimpleQueryWithArgs) WithKey(key string) *SimpleQueryWithArgs
func (*SimpleQueryWithArgs) WithMapping ¶
func (this *SimpleQueryWithArgs) WithMapping(mapping map[string]string) *SimpleQueryWithArgs
Click to show internal directories.
Click to hide internal directories.