Documentation ¶
Index ¶
- Constants
- func ExLineToHump(name string) string
- func Orderby() map[string]string
- type ZeroCondition
- type ZeroCoreProcessor
- func (processor *ZeroCoreProcessor) Build(transaction *sql.Tx)
- func (processor *ZeroCoreProcessor) DatabaseDatetime() (*time.Time, error)
- func (processor *ZeroCoreProcessor) Exec(execsql string) (sql.Result, error)
- func (processor *ZeroCoreProcessor) Parser(rows *sql.Rows) []map[string]interface{}
- func (processor *ZeroCoreProcessor) PreparedStmt(preparedSQL string) *sql.Stmt
- type ZeroLimit
- type ZeroMysqlQueryOperation
- func (opera *ZeroMysqlQueryOperation) AddDistinctID(distinctID string)
- func (opera *ZeroMysqlQueryOperation) AddFilterTableName(filterTableName string)
- func (opera *ZeroMysqlQueryOperation) AddQuery(xQuery *ZeroQuery)
- func (opera *ZeroMysqlQueryOperation) AddTableName(tableName string)
- func (opera *ZeroMysqlQueryOperation) AppendCondition(condition string)
- func (opera *ZeroMysqlQueryOperation) Build(transaction *sql.Tx)
- func (opera *ZeroMysqlQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
- type ZeroOrderBy
- type ZeroPostgresQueryOperation
- func (opera *ZeroPostgresQueryOperation) AddDistinctID(distinctID string)
- func (opera *ZeroPostgresQueryOperation) AddFilterTableName(filterTableName string)
- func (opera *ZeroPostgresQueryOperation) AddQuery(xQuery *ZeroQuery)
- func (opera *ZeroPostgresQueryOperation) AddTableName(tableName string)
- func (opera *ZeroPostgresQueryOperation) AppendCondition(condition string)
- func (opera *ZeroPostgresQueryOperation) Build(transaction *sql.Tx)
- func (opera *ZeroPostgresQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
- type ZeroQuery
- type ZeroQueryOperation
- type ZeroXsacAutoProcessor
- type ZeroXsacMysqlAutoProcessor
- func (processor *ZeroXsacMysqlAutoProcessor) AddFields(fields []*structs.ZeroXsacField)
- func (processor *ZeroXsacMysqlAutoProcessor) AddTriggers(triggers ...structs.ZeroXsacTrigger)
- func (processor *ZeroXsacMysqlAutoProcessor) Delete(datas ...interface{}) error
- func (processor *ZeroXsacMysqlAutoProcessor) Fetch(dataId string) (interface{}, error)
- func (processor *ZeroXsacMysqlAutoProcessor) FetchChildrens(field *structs.ZeroXsacField, datas interface{}) error
- func (processor *ZeroXsacMysqlAutoProcessor) Insert(datas ...interface{}) error
- func (processor *ZeroXsacMysqlAutoProcessor) Tombstone(datas ...interface{}) error
- func (processor *ZeroXsacMysqlAutoProcessor) Update(datas ...interface{}) error
- func (processor *ZeroXsacMysqlAutoProcessor) Xrestore(datas ...interface{}) error
- type ZeroXsacPostgresAutoProcessor
- func (processor *ZeroXsacPostgresAutoProcessor) AddFields(fields []*structs.ZeroXsacField)
- func (processor *ZeroXsacPostgresAutoProcessor) AddTriggers(triggers ...structs.ZeroXsacTrigger)
- func (processor *ZeroXsacPostgresAutoProcessor) Delete(datas ...interface{}) error
- func (processor *ZeroXsacPostgresAutoProcessor) Fetch(dataId string) (interface{}, error)
- func (processor *ZeroXsacPostgresAutoProcessor) FetchChildrens(field *structs.ZeroXsacField, datas interface{}) error
- func (processor *ZeroXsacPostgresAutoProcessor) Insert(datas ...interface{}) error
- func (processor *ZeroXsacPostgresAutoProcessor) Tombstone(datas ...interface{}) error
- func (processor *ZeroXsacPostgresAutoProcessor) Update(datas ...interface{}) error
- func (processor *ZeroXsacPostgresAutoProcessor) Xrestore(datas ...interface{}) error
Constants ¶
View Source
const ( XSAC_BE_INSERT = "beinsert" XSAC_BE_UPDATE = "beupdate" XSAC_BE_DELETE = "bedelete" XSAC_AF_INSERT = "afinsert" XSAC_AF_UPDATE = "afupdate" XSAC_AF_DELETE = "afdelete" )
View Source
const ( RELATION_AND = "AND" RELATION_OR = "OR" SYMBOL_EQ = "EQ" SYMBOL_NEQ = "NEQ" SYMBOL_GT = "GT" SYMBOL_LT = "LT" SYMBOL_EQGT = "EQGT" SYMBOL_EQLT = "EQLT" SYMBOL_LIKE = "LIKE" ORDER_BY_ASC = "ASC" ORDER_BY_DESC = "DESC" )
View Source
const DISTINCT_MYSQL_QUERY_COUNT_SQL_TEMPLATE = `
SELECT
count(distinct {{distinctID}}) AS QUERY_COUNT
FROM
{{filterTableName}}
{{conditions}}
`
View Source
const DISTINCT_MYSQL_QUERY_SQL_TEMPLATE = `` /* 227-byte string literal not displayed */
View Source
const DISTINCT_POSTGRES_QUERY_COUNT_SQL_TEMPLATE = `
SELECT
count(distinct {{distinctID}}) AS QUERY_COUNT
FROM
{{filterTableName}}
{{conditions}}
`
View Source
const DISTINCT_POSTGRES_QUERY_SQL_TEMPLATE = `` /* 226-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ExLineToHump ¶ added in v1.16.21
Types ¶
type ZeroCondition ¶
type ZeroCondition struct { Symbol string `json:"symbol,omitempty"` Column string `json:"column,omitempty"` Value string `json:"value,omitempty"` Relation []*ZeroCondition `json:"relation,omitempty"` }
type ZeroCoreProcessor ¶
type ZeroCoreProcessor struct {
// contains filtered or unexported fields
}
func (*ZeroCoreProcessor) Build ¶
func (processor *ZeroCoreProcessor) Build(transaction *sql.Tx)
func (*ZeroCoreProcessor) DatabaseDatetime ¶
func (processor *ZeroCoreProcessor) DatabaseDatetime() (*time.Time, error)
func (*ZeroCoreProcessor) Exec ¶ added in v1.11.44
func (processor *ZeroCoreProcessor) Exec(execsql string) (sql.Result, error)
func (*ZeroCoreProcessor) Parser ¶ added in v1.1.0
func (processor *ZeroCoreProcessor) Parser(rows *sql.Rows) []map[string]interface{}
func (*ZeroCoreProcessor) PreparedStmt ¶ added in v1.1.0
func (processor *ZeroCoreProcessor) PreparedStmt(preparedSQL string) *sql.Stmt
type ZeroMysqlQueryOperation ¶ added in v1.11.23
type ZeroMysqlQueryOperation struct { ZeroCoreProcessor Start int Length int // contains filtered or unexported fields }
func NewZeroMysqlQueryOperation ¶ added in v1.11.23
func NewZeroMysqlQueryOperation(xQuery *ZeroQuery, xTableName string) *ZeroMysqlQueryOperation
func (*ZeroMysqlQueryOperation) AddDistinctID ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) AddDistinctID(distinctID string)
func (*ZeroMysqlQueryOperation) AddFilterTableName ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) AddFilterTableName(filterTableName string)
func (*ZeroMysqlQueryOperation) AddQuery ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) AddQuery(xQuery *ZeroQuery)
func (*ZeroMysqlQueryOperation) AddTableName ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) AddTableName(tableName string)
func (*ZeroMysqlQueryOperation) AppendCondition ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) AppendCondition(condition string)
func (*ZeroMysqlQueryOperation) Build ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) Build(transaction *sql.Tx)
func (*ZeroMysqlQueryOperation) Exec ¶ added in v1.11.23
func (opera *ZeroMysqlQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
type ZeroOrderBy ¶
type ZeroPostgresQueryOperation ¶ added in v1.11.23
type ZeroPostgresQueryOperation struct { ZeroCoreProcessor Start int Length int // contains filtered or unexported fields }
func NewZeroPostgresQueryOperation ¶ added in v1.11.23
func NewZeroPostgresQueryOperation(xQuery *ZeroQuery, xTableName string) *ZeroPostgresQueryOperation
func (*ZeroPostgresQueryOperation) AddDistinctID ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) AddDistinctID(distinctID string)
func (*ZeroPostgresQueryOperation) AddFilterTableName ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) AddFilterTableName(filterTableName string)
func (*ZeroPostgresQueryOperation) AddQuery ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) AddQuery(xQuery *ZeroQuery)
func (*ZeroPostgresQueryOperation) AddTableName ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) AddTableName(tableName string)
func (*ZeroPostgresQueryOperation) AppendCondition ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) AppendCondition(condition string)
func (*ZeroPostgresQueryOperation) Build ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) Build(transaction *sql.Tx)
func (*ZeroPostgresQueryOperation) Exec ¶ added in v1.11.23
func (opera *ZeroPostgresQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
type ZeroQuery ¶
type ZeroQuery struct { Columns []string `json:"columns,omitempty"` Condition *ZeroCondition `json:"condition,omitempty"` Orderby []*ZeroOrderBy `json:"orderby,omitempty"` Limit *ZeroLimit `json:"limit,omitempty"` }
type ZeroQueryOperation ¶
type ZeroXsacAutoProcessor ¶ added in v1.11.0
type ZeroXsacAutoProcessor interface { Build(transaction *sql.Tx) AddFields(fields []*structs.ZeroXsacField) AddTriggers(...structs.ZeroXsacTrigger) Insert(...interface{}) error Update(...interface{}) error Delete(...interface{}) error Tombstone(...interface{}) error Xrestore(...interface{}) error Fetch(string) (interface{}, error) FetchChildrens(*structs.ZeroXsacField, interface{}) error }
type ZeroXsacMysqlAutoProcessor ¶ added in v1.11.42
type ZeroXsacMysqlAutoProcessor struct { ZeroCoreProcessor // contains filtered or unexported fields }
func NewXsacMysqlProcessor ¶ added in v1.11.42
func NewXsacMysqlProcessor(triggers ...structs.ZeroXsacTrigger) *ZeroXsacMysqlAutoProcessor
func (*ZeroXsacMysqlAutoProcessor) AddFields ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) AddFields(fields []*structs.ZeroXsacField)
func (*ZeroXsacMysqlAutoProcessor) AddTriggers ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) AddTriggers(triggers ...structs.ZeroXsacTrigger)
func (*ZeroXsacMysqlAutoProcessor) Delete ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) Delete(datas ...interface{}) error
func (*ZeroXsacMysqlAutoProcessor) Fetch ¶ added in v1.11.65
func (processor *ZeroXsacMysqlAutoProcessor) Fetch(dataId string) (interface{}, error)
func (*ZeroXsacMysqlAutoProcessor) FetchChildrens ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) FetchChildrens(field *structs.ZeroXsacField, datas interface{}) error
func (*ZeroXsacMysqlAutoProcessor) Insert ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) Insert(datas ...interface{}) error
func (*ZeroXsacMysqlAutoProcessor) Tombstone ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) Tombstone(datas ...interface{}) error
func (*ZeroXsacMysqlAutoProcessor) Update ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) Update(datas ...interface{}) error
func (*ZeroXsacMysqlAutoProcessor) Xrestore ¶ added in v1.11.42
func (processor *ZeroXsacMysqlAutoProcessor) Xrestore(datas ...interface{}) error
type ZeroXsacPostgresAutoProcessor ¶ added in v1.11.0
type ZeroXsacPostgresAutoProcessor struct { ZeroCoreProcessor // contains filtered or unexported fields }
func NewXsacPostgresProcessor ¶ added in v1.11.0
func NewXsacPostgresProcessor(triggers ...structs.ZeroXsacTrigger) *ZeroXsacPostgresAutoProcessor
func (*ZeroXsacPostgresAutoProcessor) AddFields ¶ added in v1.11.10
func (processor *ZeroXsacPostgresAutoProcessor) AddFields(fields []*structs.ZeroXsacField)
func (*ZeroXsacPostgresAutoProcessor) AddTriggers ¶ added in v1.11.0
func (processor *ZeroXsacPostgresAutoProcessor) AddTriggers(triggers ...structs.ZeroXsacTrigger)
func (*ZeroXsacPostgresAutoProcessor) Delete ¶ added in v1.11.0
func (processor *ZeroXsacPostgresAutoProcessor) Delete(datas ...interface{}) error
func (*ZeroXsacPostgresAutoProcessor) Fetch ¶ added in v1.11.65
func (processor *ZeroXsacPostgresAutoProcessor) Fetch(dataId string) (interface{}, error)
func (*ZeroXsacPostgresAutoProcessor) FetchChildrens ¶ added in v1.11.29
func (processor *ZeroXsacPostgresAutoProcessor) FetchChildrens(field *structs.ZeroXsacField, datas interface{}) error
func (*ZeroXsacPostgresAutoProcessor) Insert ¶ added in v1.11.0
func (processor *ZeroXsacPostgresAutoProcessor) Insert(datas ...interface{}) error
func (*ZeroXsacPostgresAutoProcessor) Tombstone ¶ added in v1.11.34
func (processor *ZeroXsacPostgresAutoProcessor) Tombstone(datas ...interface{}) error
func (*ZeroXsacPostgresAutoProcessor) Update ¶ added in v1.11.0
func (processor *ZeroXsacPostgresAutoProcessor) Update(datas ...interface{}) error
func (*ZeroXsacPostgresAutoProcessor) Xrestore ¶ added in v1.11.34
func (processor *ZeroXsacPostgresAutoProcessor) Xrestore(datas ...interface{}) error
Click to show internal directories.
Click to hide internal directories.