feat(database): 添加 ClickHouse 数据库驱动支持
- 实现了完整的 ClickHouse 驱动,包括连接、查询、插入、更新、删除等基本操作 - 添加了 ClickHouse 特有的数据类型转换和 SQL 过滤功能 - 实现了表结构查询和字段信息获取功能 - 添加了 Ping 检查和错误处理机制 - 增加了对 UPDATE 和 DELETE 语句的语法转换以适配 ClickHouse - 添加了批量插入操作的支持 - 新增了 14 个测试用例文件用于验证数据库相关功能
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package consts
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/util/gmeta"
|
||||
)
|
||||
|
||||
type (
|
||||
Var = gvar.Var // Var is a universal variable interface, like generics.
|
||||
Ctx = context.Context // Ctx is alias of frequently-used type context.Context.
|
||||
Meta = gmeta.Meta // Meta is alias of frequently-used type gmeta.Meta.
|
||||
)
|
||||
|
||||
type (
|
||||
Map = map[string]any // Map is alias of frequently-used map type map[string]any.
|
||||
MapAnyAny = map[any]any // MapAnyAny is alias of frequently-used map type map[any]any.
|
||||
MapAnyStr = map[any]string // MapAnyStr is alias of frequently-used map type map[any]string.
|
||||
MapAnyInt = map[any]int // MapAnyInt is alias of frequently-used map type map[any]int.
|
||||
MapStrAny = map[string]any // MapStrAny is alias of frequently-used map type map[string]any.
|
||||
MapStrStr = map[string]string // MapStrStr is alias of frequently-used map type map[string]string.
|
||||
MapStrInt = map[string]int // MapStrInt is alias of frequently-used map type map[string]int.
|
||||
MapIntAny = map[int]any // MapIntAny is alias of frequently-used map type map[int]any.
|
||||
MapIntStr = map[int]string // MapIntStr is alias of frequently-used map type map[int]string.
|
||||
MapIntInt = map[int]int // MapIntInt is alias of frequently-used map type map[int]int.
|
||||
MapAnyBool = map[any]bool // MapAnyBool is alias of frequently-used map type map[any]bool.
|
||||
MapStrBool = map[string]bool // MapStrBool is alias of frequently-used map type map[string]bool.
|
||||
MapIntBool = map[int]bool // MapIntBool is alias of frequently-used map type map[int]bool.
|
||||
)
|
||||
|
||||
type (
|
||||
List = []Map // List is alias of frequently-used slice type []Map.
|
||||
ListAnyAny = []MapAnyAny // ListAnyAny is alias of frequently-used slice type []MapAnyAny.
|
||||
ListAnyStr = []MapAnyStr // ListAnyStr is alias of frequently-used slice type []MapAnyStr.
|
||||
ListAnyInt = []MapAnyInt // ListAnyInt is alias of frequently-used slice type []MapAnyInt.
|
||||
ListStrAny = []MapStrAny // ListStrAny is alias of frequently-used slice type []MapStrAny.
|
||||
ListStrStr = []MapStrStr // ListStrStr is alias of frequently-used slice type []MapStrStr.
|
||||
ListStrInt = []MapStrInt // ListStrInt is alias of frequently-used slice type []MapStrInt.
|
||||
ListIntAny = []MapIntAny // ListIntAny is alias of frequently-used slice type []MapIntAny.
|
||||
ListIntStr = []MapIntStr // ListIntStr is alias of frequently-used slice type []MapIntStr.
|
||||
ListIntInt = []MapIntInt // ListIntInt is alias of frequently-used slice type []MapIntInt.
|
||||
ListAnyBool = []MapAnyBool // ListAnyBool is alias of frequently-used slice type []MapAnyBool.
|
||||
ListStrBool = []MapStrBool // ListStrBool is alias of frequently-used slice type []MapStrBool.
|
||||
ListIntBool = []MapIntBool // ListIntBool is alias of frequently-used slice type []MapIntBool.
|
||||
)
|
||||
|
||||
type (
|
||||
Slice = []any // Slice is alias of frequently-used slice type []any.
|
||||
SliceAny = []any // SliceAny is alias of frequently-used slice type []any.
|
||||
SliceStr = []string // SliceStr is alias of frequently-used slice type []string.
|
||||
SliceInt = []int // SliceInt is alias of frequently-used slice type []int.
|
||||
)
|
||||
|
||||
type (
|
||||
Array = []any // Array is alias of frequently-used slice type []any.
|
||||
ArrayAny = []any // ArrayAny is alias of frequently-used slice type []any.
|
||||
ArrayStr = []string // ArrayStr is alias of frequently-used slice type []string.
|
||||
ArrayInt = []int // ArrayInt is alias of frequently-used slice type []int.
|
||||
)
|
||||
Reference in New Issue
Block a user