engine

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 BuildSelectAndType(table string, join []structs.JoinData, conn *gorm.DB) (query string, fieldAlias map[string]string, err error)

func BuildType added in v0.6.2

func BuildType(table string, conn *gorm.DB) (fieldAlias map[string]string)

func CheckReserved

func CheckReserved(columnName string) string

CheckReserved Skip reserved words

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 DataOutput(columns []structs.Data, rows *sql.Rows, columnsType []structs.ColumnType) ([]interface{}, error)

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 DefaultBinding(db *gorm.DB, selectQuery, table string, whereJoin []structs.JoinData) ([]*sql.ColumnType, error)

func DialectBinding added in v0.6.2

func DialectBinding(db *gorm.DB, table string, whereJoin []structs.JoinData) (typeReturn map[string]string, err error)

func DrawNumber

func DrawNumber(c Controller) int

DrawNumber Get drawNumber

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 Flated

func Flated(whereArray []string) string

func InitBinding added in v0.6.2

func InitBinding(db *gorm.DB, selectQuery, table string, whereJoin []structs.JoinData, fieldAlias map[string]string) ([]structs.ColumnType, error)

func Limit added in v0.6.2

func Limit(c Controller) func(db *gorm.DB) *gorm.DB

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 Search(column []structs.Data, keyColumnsI string) int

func SelectDialect added in v0.6.2

func SelectDialect(conn *gorm.DB) (err error)

func SetGlobalQuery added in v0.6.4

func SetGlobalQuery(db *gorm.DB, query string, param interface{}, first bool) *gorm.DB

func SetJoins added in v0.6.4

func SetJoins(joins []structs.JoinData) func(db *gorm.DB) *gorm.DB

func SetQuery added in v0.6.4

func SetQuery(db *gorm.DB, query, logic string, param interface{}) *gorm.DB

func Simple

func Simple(c Controller, conn *gorm.DB,
	table string,
	columns []structs.Data) (responseJSON structs.MessageDataTable, err error)

Simple is a main method, externally called

Types

type Controller

type Controller interface {
	GetString(string, ...string) string
}

Controller emulate the beego controller

Jump to

Keyboard shortcuts

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