Documentation ¶
Index ¶
- Variables
- func ModelObjects(m factory.Model) []interface{}
- func ParseMysqlConnectionURL(settings *mysql.ConnectionURL)
- func ParseSQL(sqlFile string, isFile bool, installer func(string) error) (err error)
- func ReplaceCharset(sqlStr string, charset string, checkCreateDDL ...bool) string
- func ReplacePrefix(m factory.Model, field string, oldPrefix string, newPrefix string) error
- func SQLLineParser(exec func(string) error, useCommentSQL ...bool) func(string) error
- type SQLQuery
- func (s *SQLQuery) CacheKey(cacheKey string) *SQLQuery
- func (s *SQLQuery) CacheTTL(ttlSeconds int64) *SQLQuery
- func (s *SQLQuery) GetFloat64(query string, args ...interface{}) (null.Float64, error)
- func (s *SQLQuery) GetInt(query string, args ...interface{}) (null.Int, error)
- func (s *SQLQuery) GetInt32(query string, args ...interface{}) (null.Int32, error)
- func (s *SQLQuery) GetInt64(query string, args ...interface{}) (null.Int64, error)
- func (s *SQLQuery) GetModel(name string, args ...interface{}) (interface{}, error)
- func (s *SQLQuery) GetModels(name string, args ...interface{}) ([]interface{}, error)
- func (s *SQLQuery) GetModelsWithPaging(name string, args ...interface{}) ([]interface{}, error)
- func (s *SQLQuery) GetRow(query string, args ...interface{}) (null.StringMap, error)
- func (s *SQLQuery) GetRows(query string, args ...interface{}) (null.StringMapSlice, error)
- func (s *SQLQuery) GetString(query string, args ...interface{}) (null.String, error)
- func (s *SQLQuery) GetUint(query string, args ...interface{}) (null.Uint, error)
- func (s *SQLQuery) GetUint32(query string, args ...interface{}) (null.Uint32, error)
- func (s *SQLQuery) GetUint64(query string, args ...interface{}) (null.Uint64, error)
- func (s *SQLQuery) GetValue(recv interface{}, query string, args ...interface{}) error
- func (s *SQLQuery) Limit(limit int) *SQLQuery
- func (s *SQLQuery) LinkID(dbLinkID int) *SQLQuery
- func (s *SQLQuery) LinkName(dbLinkName string) *SQLQuery
- func (s *SQLQuery) MustGetFloat64(query string, args ...interface{}) null.Float64
- func (s *SQLQuery) MustGetInt(query string, args ...interface{}) null.Int
- func (s *SQLQuery) MustGetInt32(query string, args ...interface{}) null.Int32
- func (s *SQLQuery) MustGetInt64(query string, args ...interface{}) null.Int64
- func (s *SQLQuery) MustGetModel(structName string, args ...interface{}) interface{}
- func (s *SQLQuery) MustGetModels(structName string, args ...interface{}) []interface{}
- func (s *SQLQuery) MustGetModelsWithPaging(structName string, args ...interface{}) []interface{}
- func (s *SQLQuery) MustGetRow(query string, args ...interface{}) null.StringMap
- func (s *SQLQuery) MustGetRows(query string, args ...interface{}) null.StringMapSlice
- func (s *SQLQuery) MustGetString(query string, args ...interface{}) null.String
- func (s *SQLQuery) MustGetUint(query string, args ...interface{}) null.Uint
- func (s *SQLQuery) MustGetUint32(query string, args ...interface{}) null.Uint32
- func (s *SQLQuery) MustGetUint64(query string, args ...interface{}) null.Uint64
- func (s *SQLQuery) Offset(offset int) *SQLQuery
- func (s *SQLQuery) OrderBy(sorts ...interface{}) *SQLQuery
- type SelectPageSortValues
- type SetContext
Constants ¶
This section is empty.
Variables ¶
View Source
var SQLKeyReplacer = strings.NewReplacer("`", "``", ".", "`.`")
Functions ¶
func ModelObjects ¶
func ParseMysqlConnectionURL ¶
func ParseMysqlConnectionURL(settings *mysql.ConnectionURL)
func ReplaceCharset ¶
ReplaceCharset 替换DDL语句中的字符集
func ReplacePrefix ¶
ReplacePrefix 替换前缀数据
Types ¶
type SQLQuery ¶
type SQLQuery struct {
// contains filtered or unexported fields
}
func NewSQLQuery ¶
func NewSQLQueryLimit ¶
func (*SQLQuery) GetFloat64 ¶
func (*SQLQuery) GetModelsWithPaging ¶
func (*SQLQuery) GetRows ¶
func (s *SQLQuery) GetRows(query string, args ...interface{}) (null.StringMapSlice, error)
GetRows 查询多行
func (*SQLQuery) MustGetFloat64 ¶
func (*SQLQuery) MustGetInt ¶
func (*SQLQuery) MustGetInt32 ¶
func (*SQLQuery) MustGetInt64 ¶
func (*SQLQuery) MustGetModel ¶
func (*SQLQuery) MustGetModels ¶
func (*SQLQuery) MustGetModelsWithPaging ¶
func (*SQLQuery) MustGetRow ¶
func (*SQLQuery) MustGetRows ¶
func (s *SQLQuery) MustGetRows(query string, args ...interface{}) null.StringMapSlice
func (*SQLQuery) MustGetString ¶
func (*SQLQuery) MustGetUint ¶
func (*SQLQuery) MustGetUint32 ¶
func (*SQLQuery) MustGetUint64 ¶
type SelectPageSortValues ¶
func SelectPageCond ¶
func (SelectPageSortValues) AddToSorts ¶
func (s SelectPageSortValues) AddToSorts(sorts []interface{}) []interface{}
func (SelectPageSortValues) IsEmpty ¶
func (s SelectPageSortValues) IsEmpty() bool
func (SelectPageSortValues) IsMultiple ¶
func (s SelectPageSortValues) IsMultiple() bool
func (SelectPageSortValues) OrderByString ¶
func (s SelectPageSortValues) OrderByString() string
type SetContext ¶
Click to show internal directories.
Click to hide internal directories.