1 Star 0 Fork 0

tomatomeatman/GolangRepository

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
WhereInfo.go 867 Bytes
一键复制 编辑 原始数据 按行查看 历史
tomatomeatman 提交于 2025-03-21 12:42 +08:00 . 2
package dbinfo
/**
* @Description: 查询条件
*/
type WhereInfo struct {
Name string //属性名(注意:非字段名)
Value interface{} //字段值
ValueName string //值字段名,与Value互斥, 一般用于条件 Name < ValueNmae的情况,如 'where dStTime < dStopTime'
Condition string //查询条件符号
}
/**
* @Description: 查询条件符号
*/
const (
Eq = "="
Lt = "<"
Le = "<="
Gt = ">"
Ge = ">="
Ne = "<>"
Between = "BETWEEN"
NotBetween = "NOT BETWEEN"
Like = "LIKE"
NoLike = "NOT LIKE"
IsNull = "IS NULL"
IsNotNull = "IS NOT NULL"
In = "IN"
NotIn = "NOT IN"
)
func NewWhereInfo(name string, value interface{}) *WhereInfo {
return &WhereInfo{
Name: name,
Value: value,
ValueName: "",
Condition: "=",
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/tomatomeatman/golang-repository.git
git@gitee.com:tomatomeatman/golang-repository.git
tomatomeatman
golang-repository
GolangRepository
941dedad80c3

搜索帮助