feat(db): 添加对达梦数据库的支持
- 在应用程序中新增对达梦数据库(DM)的配置和连接支持 - 实现 SetDmDB 函数以配置达梦数据库连接 - 更新数据库操作逻辑,支持达梦特有的 SQL 语法和功能 - 在相关文件中添加达梦数据库的处理逻辑,包括表创建、数据插入和查询 - 更新 go.mod 和 go.sum 文件以引入达梦数据库驱动 - 增强文档,详细说明达梦数据库的配置和使用方法
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2018, 达梦数据库有限公司.
|
||||
* All rights reserved.
|
||||
*/
|
||||
package parser
|
||||
|
||||
import "strconv"
|
||||
|
||||
const (
|
||||
MAX_DEC_LEN = 38
|
||||
)
|
||||
|
||||
const (
|
||||
NORMAL int = iota
|
||||
INT
|
||||
DOUBLE
|
||||
DECIMAL
|
||||
STRING
|
||||
HEX_INT
|
||||
WHITESPACE_OR_COMMENT
|
||||
NULL
|
||||
)
|
||||
|
||||
type LVal struct {
|
||||
Value string
|
||||
Tp int
|
||||
Position int
|
||||
}
|
||||
|
||||
func newLValNoParams() *LVal {
|
||||
return new(LVal).reset()
|
||||
}
|
||||
|
||||
func newLVal(value string, tp int) *LVal {
|
||||
return &LVal{Value: value, Tp: tp}
|
||||
}
|
||||
|
||||
func (l *LVal) reset() *LVal {
|
||||
l.Value = ""
|
||||
l.Tp = NORMAL
|
||||
return l
|
||||
}
|
||||
|
||||
func (l *LVal) String() string {
|
||||
return strconv.Itoa(l.Tp) + ":" + l.Value
|
||||
}
|
||||
+1206
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user