Documentation
¶
Index ¶
- Constants
- type ZeroCondition
- type ZeroCoreProcessor
- func (processor *ZeroCoreProcessor) Build(transaction *sql.Tx)
- func (processor *ZeroCoreProcessor) DatabaseDatetime() (*time.Time, error)
- func (processor *ZeroCoreProcessor) Parser(rows *sql.Rows) []map[string]interface{}
- func (processor *ZeroCoreProcessor) PreparedStmt(preparedSQL string) *sql.Stmt
- type ZeroLimit
- type ZeroOrderBy
- type ZeroQuery
- type ZeroQueryOperation
- func (opera *ZeroQueryOperation) AppendCondition(condition string)
- func (opera *ZeroQueryOperation) Build(transaction *sql.Tx)
- func (opera *ZeroQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
- func (opera *ZeroQueryOperation) SetDistinctID(distinctID string)
- func (opera *ZeroQueryOperation) SetFilterTableName(filterTableName string)
Constants ¶
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_QUERY_COUNT_SQL_TEMPLATE = `
SELECT
count(distinct {{distinctID}}) AS QUERY_COUNT
FROM
{{filterTableName}}
{{conditions}}
`
View Source
const DISTINCT_QUERY_SQL_TEMPLATE = `` /* 207-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) 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 ZeroOrderBy ¶
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 ZeroQueryOperation struct { ZeroCoreProcessor Query *ZeroQuery TableName string Start int Length int // contains filtered or unexported fields }
func (*ZeroQueryOperation) AppendCondition ¶
func (opera *ZeroQueryOperation) AppendCondition(condition string)
func (*ZeroQueryOperation) Build ¶
func (opera *ZeroQueryOperation) Build(transaction *sql.Tx)
func (*ZeroQueryOperation) Exec ¶
func (opera *ZeroQueryOperation) Exec() ([]map[string]interface{}, map[string]interface{})
func (*ZeroQueryOperation) SetDistinctID ¶
func (opera *ZeroQueryOperation) SetDistinctID(distinctID string)
func (*ZeroQueryOperation) SetFilterTableName ¶
func (opera *ZeroQueryOperation) SetFilterTableName(filterTableName string)
Click to show internal directories.
Click to hide internal directories.