Documentation ¶
Index ¶
Constants ¶
View Source
const ( FALSE = 0 TRUE = 1 )
View Source
const ( QueryModeSingle = 0 //单个执行单元 QueryModeParallel = 1 //多个执行单元并发 QueryModeCompound = 2 //复合查询 )
View Source
const ( NoCompression = 0 Compression = 1 )
View Source
const ( RequestTypeRPC = 0 RequestTypeHTTP = 1 RequestTypeWeb = 2 )
View Source
const ( StatusOnline = 1 // 正常 StatusOffline = 2 // 下线 )
View Source
const ( DBTypeNil = 0 // 空操作,仅走插件 DBTypeElastic = 1 // elastic search DBTypeMongo = 2 // mongo 暂未支持 DBTypeRedis = 3 // redis DBTypeMySQL = 10 // mysql DBTypePostgreSQL = 11 // postgresql DBTypeClickHouse = 12 // clickhouse DBTypeOracle = 13 // oracle 暂未支持 DBTypeDB2 = 14 // DB2 暂未支持 DBTypeSQLite = 15 // sqlite 暂未支持 DBTypeRPC = 40 // rpc 协议,暂未支持,spring cloud 协议可以选 grpc、thrift、tars、dubbo 协议 DBTypeHTTP = 50 // http 请求 )
View Source
const ( OPEqual = "=" // 等于 OPBetween = "()" // 在某个区间 OPNotBetween = "!()" // 不在某个区间 OPGt = ">" // 大于 OPGte = ">=" // 大于等于 OPLt = "<" // 小于 OPLte = "<=" // 小于等于 OPNot = "!" // 去反 OPLike = "~" // like语句,(或 es 的部分匹配) OPNotLike = "!~" // not like 语句,(或 es 的部分匹配排除) OPMatchPhrase = "?" // es 短语匹配 match_phrase OPNotMatchPhrase = "!?" // es 短语匹配排除 must_not match_phrase OPMatch = "*" // es 全文搜索 match 语句 OPNotMatch = "!*" // es 全文搜索排除 must_not match )
View Source
const ( AND = "AND" OR = "OR" NOT = "NOT" )
View Source
const ( NotOP = 0 AndOrNot = 1 EsKeyword = 2 )
View Source
const ( OpTypeRead = 1 // 读数据 OpTypeAdd = 2 // 新增数据 OpTypeMod = 3 // 修改数据 OpTypeDel = 4 // 删除数据 OpTypeCreate = 5 // 创建表 OpTypeDrop = 6 // 删除表 OpTypeTrans = 7 // 事务节点 OpTypeAuth = 8 // 暂未支持 )
View Source
const ( OpAuth = "auth" // 暂未支持 OpInsert = "insert" OpReplace = "replace" OpUpdate = "update" OpDelete = "delete" OpFind = "find" OpFindAll = "find_all" OpTransaction = "transaction" // ddl OpCreate = "create" OpDrop = "drop" // redis 操作 OpExpire = "expire" OpTTL = "ttl" OpExists = "exists" OpDel = "del" OpSet = "set" OpSetEx = "setex" OpSetNX = "setnx" OpMSet = "mset" OpGet = "get" OpMGet = "mget" OpGetSet = "getset" OpIncr = "incr" OpDecr = "decr" OpIncrBy = "incrby" OpSetBit = "setbit" OpGetBit = "getbit" OpBitCount = "bitcount" OpHSet = "hset" OpHSetNx = "hsetnx" OpHmSet = "hmset" OpHIncrBy = "hincrby" OpHIncrByFloat = "hincrbyfloat" OpHDel = "hdel" OpHGet = "hget" OpHMGet = "hmget" OpHGetAll = "hgetall" OpHKeys = "hkeys" OpHVals = "hvals" OpHExists = "hexists" OpHLen = "hlen" OpHStrLen = "hstrlen" OpLPush = "lpush" OpRPush = "rpush" OpLPop = "lpop" OpRPop = "rpop" OpLLen = "llen" OpSAdd = "sadd" OpSMove = "smove" OpSPop = "spop" OpSRem = "srem" OpSCard = "scard" OpSMembers = "smembers" OpSIsMember = "sismember" OpSRandMember = "srandmember" OpZAdd = "zadd" OpZRem = "zrem" OpZRemRangeByScore = "zremrangebyscore" OpZRemRangeByRank = "zremrangebyrank" OpZIncrBy = "zincrby" OpZPopMin = "zpopmin" OpZPopMax = "zpopmax" OpZCard = "zcard" OpZScore = "zscore" OpZRank = "zrank" OpZRevRank = "zrevrank" OpZCount = "zcount" OpZRange = "zrange" OpZRangeByScore = "zrangebyscore" OpZRevRange = "zrevrange" OpZRevRangeByScore = "zrevrangebyscore" )
View Source
const ( DataTypeOther = iota // 其他类型 DataTypeBytes // 类型是 []byte DataTypeTime // 类型是 time.Time DataTypeInt // 类型是 int DataTypeInt8 // 类型是 int8 DataTypeInt16 // 类型是 int16 DataTypeInt32 // 类型是 int32 DataTypeInt64 // 类型是 int64 DataTypeUint // 类型是 uint DataTypeUint8 // 类型是 uint8 DataTypeUint16 // 类型是 uint16 DataTypeUint32 // 类型是 uint32 DataTypeUint64 // 类型是 uint64 )
View Source
const ( RedisRetTypeNil = 1 // 无返回 RedisRetTypeString = 2 // 字符串 RedisRetTypeBool = 3 // bool RedisRetTypeInt64 = 4 // int64 RedisRetTypeFloat64 = 5 // float64 RedisRetTypeStrings = 6 // 字符串数组 RedisRetTypeMapString = 7 // map[string]string RedisRetTypeMemberScore = 8 // 有序成员 )
Variables ¶
View Source
var DBTypeDesc = map[int]string{ DBTypeNil: "nil", DBTypeElastic: "elastic", DBTypeRedis: "redis", DBTypeMySQL: "mysql", DBTypePostgreSQL: "postgresql", DBTypeClickHouse: "clickhouse", DBTypeOracle: "oracle", DBTypeDB2: "db2", DBTypeSQLite: "sqlite", DBTypeMongo: "mongo", }
View Source
var DBTypeMap = map[string]int{ "nil": DBTypeNil, "elastic": DBTypeElastic, "redis": DBTypeRedis, "mysql": DBTypeMySQL, "postgresql": DBTypePostgreSQL, "clickhouse": DBTypeClickHouse, "oracle": DBTypeOracle, "db2": DBTypeDB2, "sqlite": DBTypeSQLite, "mongo": DBTypeMongo, }
View Source
var DBTypes = []int{ DBTypeNil, DBTypeElastic, DBTypeMongo, DBTypeRedis, DBTypeMySQL, DBTypePostgreSQL, DBTypeClickHouse, DBTypeOracle, DBTypeDB2, DBTypeSQLite, DBTypeRPC, DBTypeHTTP, }
View Source
var QueryModeDesc = map[int8]string{ QueryModeSingle: "single", QueryModeParallel: "parallel", QueryModeCompound: "compound", }
Functions ¶
func GetDataType ¶
func GetDataType(v interface{}) int8
func GetRedisRetType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.