sql

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(items ...xqi.SqlLogic) xqi.SqlCondition

func Avg

func Avg(expr interface{}) SqlField

func Case

func Case(expr interface{}, cases map[interface{}]interface{}, caseElse ...interface{}) SqlField

func CaseThen

func CaseThen(condition interface{}, caseTrue, caseFalse interface{}) SqlField

func Cast

func Cast(expr interface{}, asType DbType) SqlField

func Concat

func Concat(str interface{}, str1 interface{}, more ...interface{}) SqlField

字符串连接

func Count

func Count(expr interface{}) SqlField

func DateAdd

func DateAdd(date interface{}, interval int, datePart xdriveri.DatePart) SqlField

func DateDiff

func DateDiff(date1, date2 interface{}, datePart xdriveri.DatePart) SqlField

func DateFormat

func DateFormat(expr interface{}, format string) SqlField

func DateSub

func DateSub(date interface{}, interval int, datePart xdriveri.DatePart) SqlField

func DateToUnix

func DateToUnix(date interface{}) SqlField

func Eq

func Eq(exp1, exp2 interface{}) xqi.SqlConditionItem

func Field

func Field(expr interface{}) xqi.SqlField

func Gt

func Gt(exp1, exp2 interface{}) xqi.SqlConditionItem

func Gte

func Gte(exp1, exp2 interface{}) xqi.SqlConditionItem

func If

func If(expr interface{}, trueValue, falseValue interface{}) SqlField

func IfNull

func IfNull(expr interface{}, nullVal interface{}) SqlField

func In

func In(exp1, exp2 interface{}) xqi.SqlConditionItem

func Like

func Like(exp1, exp2 interface{}) xqi.SqlConditionItem

func Lt

func Lt(exp1, exp2 interface{}) xqi.SqlConditionItem

func Lte

func Lte(exp1, exp2 interface{}) xqi.SqlConditionItem

func Max

func Max(expr interface{}) SqlField

func Min

func Min(expr interface{}) SqlField

func Neq

func Neq(exp1, exp2 interface{}) xqi.SqlConditionItem

func NotIn

func NotIn(exp1, exp2 interface{}) xqi.SqlConditionItem

func NotLike

func NotLike(exp1, exp2 interface{}) xqi.SqlConditionItem

func On

func On(items ...xqi.SqlLogic) xqi.SqlCondition

func OpDiv

func OpDiv(v1, v2 interface{}) SqlField

除法运算

func OpMul

func OpMul(v1, v2 interface{}) SqlField

乘法运算

func OpPlus

func OpPlus(v1, v2 interface{}) SqlField

加法运算

func OpSub

func OpSub(v1, v2 interface{}) SqlField

减法运算

func Or

func Or(items ...xqi.SqlLogic) xqi.SqlCondition

func Static

func Static(v interface{}) xqi.SqlStaticExpr

创建sql常量

func Substring

func Substring(str interface{}, from, len int) SqlField

字符串截取

func Sum

func Sum(expr interface{}) SqlField

func UnixToDate

func UnixToDate(unix interface{}) SqlField

func Var

func Var(varName string, v interface{}) xqi.SqlVarExpr

创建sql变量

func Where

func Where(items ...xqi.SqlLogic) xqi.SqlCondition

func Xor

func Xor(items ...xqi.SqlLogic) xqi.SqlCondition

Types

This section is empty.

Jump to

Keyboard shortcuts

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