xq

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 数据库int类型
	DTInt = xqcomm2.DTInt
	// 数据库tinyint类型
	DTTinyint = xqcomm2.DTTinyint
	// 数据库smallint类型
	DTSmallint = xqcomm2.DTSmallint
	// 数据库bigint类型
	DTBigint = xqcomm2.DTBigint

	// 数据库float类型
	DTFloat = xqcomm2.DTFloat
	// 数据库double类型
	DTDouble = xqcomm2.DTDouble
	// 数据库decimal类型
	DTDecimal = xqcomm2.DTDecimal

	// 数据库date类型
	DTDate = xqcomm2.DTDate
	// 数据库time类型
	DTTime = xqcomm2.DTTime
	// 数据库datetime类型
	DTDatetime = xqcomm2.DTDatetime
	// 数据库timestamp类型
	DTTimestamp = xqcomm2.DTTimestamp

	// 数据库char类型
	DTChar = xqcomm2.DTChar
	// 数据库varchar类型
	DTVarchar = xqcomm2.DTVarchar
	// 数据库tinytext类型
	DTTinytext = xqcomm2.DTTinytext
	// 数据库text类型
	DTText = xqcomm2.DTText
	// 数据库longtext类型
	DTLongtext = xqcomm2.DTLongtext

	// 数据库blob类型
	DTBlob = xqcomm2.DTBlob
	// 数据库tinyblob类型
	DTTinyblob = xqcomm2.DTTinyblob
	// 数据库longblob类型
	DTLongblob = xqcomm2.DTLongblob

	// 数据库binary类型
	DTBinary = xqcomm2.DTBinary
	// 数据库varbinary类型
	DTVarbinary = xqcomm2.DTVarbinary
)

数据库数据类型

View Source
var (
	SFCase       = xqcomm2.SqlFunCase
	SFSubstr     = xqcomm2.SqlFunSubstring
	SFConcat     = xqcomm2.SqlFunStrConcat
	SFDateFormat = xqcomm2.SqlFunDateFormat
	SFDateDiff   = xqcomm2.SqlFunDateFormat
	SFDateAdd    = xqcomm2.SqlFunDateAdd
	SFDateSub    = xqcomm2.SqlFunDateSub
	SFDateToUnix = xqcomm2.SqlFunDateToUnix
	SFUnixToDate = xqcomm2.SqlFunUnixToDate
	SFIfNull     = xqcomm2.SqlFunIfNull
	SFIsNull     = xqcomm2.SqlFunIsNull
	SFIf         = xqcomm2.SqlFunIf
	SFCast       = xqcomm2.SqlFunCast
)

sql 常用函数方法

View Source
var (
	NewBaseTable = xqcomm2.NewSqlTable
	NewBaseField = xqcomm2.NewSqlTableField
	NewField     = xqcomm2.NewSqlField
	RealValue    = func(val interface{}, varName ...string) xqi.SqlVarExpr {
		return xqcomm2.NewSqlVar(nil, val, varName...)
	}
	NewSqlContext = xqcomm2.NewSqlCompileContext
)

创建方法

Functions

func Database

func Database(dbName ...string) xqi.Database

通过名称获取指定数据库 @param dbName 配置的数据库名称

func Delete

func Delete(table xqi.SqlTable, dbName ...string) xdelete.SqlDelete

func DeleteByDb

func DeleteByDb(table xqi.SqlTable, db xqi.Database) xdelete.SqlDelete

func Insert

func Insert(table xqi.SqlTable, dbName ...string) xinsert.SqlInsert

在指定名称的数据库上向指定表插入数据

func InsertByDb

func InsertByDb(table xqi.SqlTable, db xqi.Database) xinsert.SqlInsert

在指定的数据库上向指定表插入数据

func Query

func Query(dbName ...string) xqi.QuerySelect

在指定数据库上查询数据 @param dbName 为空时在默认数据库上查询数据

func QueryByDb

func QueryByDb(db xqi.Database) xqi.QuerySelect

在指定数据库上查询数据

func Update

func Update(table xqi.SqlTable, dbName ...string) xupdate.SqlUpdate

在指定名称的数据库上更新数据库表

func UpdateByDb

func UpdateByDb(table xqi.SqlTable, db xqi.Database) xupdate.SqlUpdate

在指定的数据库上更新数据库表

Types

type DbType

type DbType = xqi.DbType

type SqlBaseTable

type SqlBaseTable = *xqcomm2.TSqlTable

type SqlCase

type SqlCase = xqi.SqlCase

type SqlCaseThenElse

type SqlCaseThenElse = xqi.SqlCaseThenElse

type SqlCondition

type SqlCondition = xqi.SqlCondition

type SqlConditionItem

type SqlConditionItem = xqi.SqlConditionItem

func Eq

func Eq(exp1, exp2 interface{}) SqlConditionItem

func Gt

func Gt(exp1, exp2 interface{}) SqlConditionItem

func Gte

func Gte(exp1, exp2 interface{}) SqlConditionItem

func In

func In(exp, arr interface{}) SqlConditionItem

func Like

func Like(exp, val interface{}) SqlConditionItem

func Lt

func Lt(exp1, exp2 interface{}) SqlConditionItem

func Lte

func Lte(exp1, exp2 interface{}) SqlConditionItem

func Neq

func Neq(exp1, exp2 interface{}) SqlConditionItem

func Not

func Not(exp interface{}) SqlConditionItem

func NotIn

func NotIn(exp, arr interface{}) SqlConditionItem

func NotLike

func NotLike(exp, val interface{}) SqlConditionItem

type SqlField

type SqlField = xqi.SqlField

type SqlFun

type SqlFun = xqi.SqlFun

type SqlLogic

type SqlLogic = xqi.SqlConditionLogic

type SqlQuery

type SqlQuery = xqi.SqlQuery

type SqlTable

type SqlTable = xqi.SqlTable

type SqlTableField

type SqlTableField = xqi.SqlTable

type SqlTables

type SqlTables = xqi.SqlTables

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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