Documentation ¶
Index ¶
- Variables
- func BuildSelectAndType(table string, join []structs.JoinData, conn *gorm.DB) (query string, fieldAlias map[string]string, err error)
- func BuildType(table string, conn *gorm.DB) (fieldAlias map[string]string)
- func CheckReserved(columnName string) string
- func Complex(c Controller, conn *gorm.DB, table string, columns []structs.Data, ...) (responseJSON structs.MessageDataTable, err error)
- func DataComplex(c Controller, conn *gorm.DB, table string, columns []structs.Data, ...) (responseJSON structs.MessageDataTable, err error)
- func DataOutput(columns []structs.Data, rows *sql.Rows, columnsType []structs.ColumnType) ([]interface{}, error)
- func DataSimple(c Controller, conn *gorm.DB, table string, columns []structs.Data) (responseJSON structs.MessageDataTable, err error)
- func DefaultBinding(db *gorm.DB, selectQuery, table string, whereJoin []structs.JoinData) ([]*sql.ColumnType, error)
- func DialectBinding(db *gorm.DB, table string, whereJoin []structs.JoinData) (typeReturn map[string]string, err error)
- func DrawNumber(c Controller) int
- func FilterGlobal(c Controller, columns []structs.Data, columnsType []structs.ColumnType, ...) *gorm.DB
- func FilterIndividual(c Controller, columns []structs.Data, columnsType []structs.ColumnType, ...) *gorm.DB
- func FindType(columnName string, columnsType []structs.ColumnType) structs.ColumnType
- func Flated(whereArray []string) string
- func InitBinding(db *gorm.DB, selectQuery, table string, whereJoin []structs.JoinData, ...) ([]structs.ColumnType, error)
- func Limit(c Controller) func(db *gorm.DB) *gorm.DB
- func Order(c Controller, columns []structs.Data, columnsType []structs.ColumnType) func(db *gorm.DB) *gorm.DB
- func ParamToBool(c Controller, paramName string) (requestRegex bool)
- func Search(column []structs.Data, keyColumnsI string) int
- func SelectDialect(conn *gorm.DB) (err error)
- func SetGlobalQuery(db *gorm.DB, query string, param interface{}, first bool) *gorm.DB
- func SetJoins(joins []structs.JoinData) func(db *gorm.DB) *gorm.DB
- func SetQuery(db *gorm.DB, query, logic string, param interface{}) *gorm.DB
- func Simple(c Controller, conn *gorm.DB, table string, columns []structs.Data) (responseJSON structs.MessageDataTable, err error)
- type Controller
Constants ¶
This section is empty.
Variables ¶
View Source
var MyDialectFunction *structs.DialectFunctions
View Source
var ReservedWords = []string{}/* 825 elements not displayed */
Functions ¶
func BuildSelectAndType ¶ added in v0.6.4
func Complex ¶
func Complex(c Controller, conn *gorm.DB, table string, columns []structs.Data, whereResult []string, whereAll []string, whereJoin []structs.JoinData) (responseJSON structs.MessageDataTable, err error)
Complex is a main method, externally called
func DataComplex ¶
func DataComplex(c Controller, conn *gorm.DB, table string, columns []structs.Data, whereResult []string, whereAll []string, whereJoin []structs.JoinData) (responseJSON structs.MessageDataTable, err error)
Complex is a main method, externally called
func DataOutput ¶ added in v0.6.2
func DataSimple ¶
func DataSimple(c Controller, conn *gorm.DB, table string, columns []structs.Data) (responseJSON structs.MessageDataTable, err error)
Simple is a main method, externally called, only return Data
func DefaultBinding ¶ added in v0.6.2
func DialectBinding ¶ added in v0.6.2
func FilterGlobal ¶ added in v0.6.2
func FilterGlobal(c Controller, columns []structs.Data, columnsType []structs.ColumnType, db *gorm.DB) *gorm.DB
database func
func FilterIndividual ¶ added in v0.6.2
func FilterIndividual(c Controller, columns []structs.Data, columnsType []structs.ColumnType, db *gorm.DB) *gorm.DB
func FindType ¶ added in v0.6.2
func FindType(columnName string, columnsType []structs.ColumnType) structs.ColumnType
func InitBinding ¶ added in v0.6.2
func Order ¶ added in v0.6.2
func Order(c Controller, columns []structs.Data, columnsType []structs.ColumnType) func(db *gorm.DB) *gorm.DB
func ParamToBool ¶
func ParamToBool(c Controller, paramName string) (requestRegex bool)
ParamToBool get a param and parse it to bool
func SelectDialect ¶ added in v0.6.2
func SetGlobalQuery ¶ added in v0.6.4
Types ¶
type Controller ¶
Controller emulate the beego controller
Click to show internal directories.
Click to hide internal directories.