2 Star 1 Fork 1

mosache/YFrame

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
predicate.go 659 Bytes
一键复制 编辑 原始数据 按行查看 历史
ヤ沒脩袮兲︶ 提交于 2023-06-21 18:32 . temp
package orm
type op string
func (o op) string() string {
return string(o)
}
const (
opEq = " = "
opLt = " < "
opGt = " > "
opAND = " AND "
opOR = " OR "
opNot = "NOT "
opPlus = " + "
)
type Predicate struct {
left Expression
op op
right Expression
}
func (left Predicate) expr() {}
func (left Predicate) And(right Predicate) Predicate {
return Predicate{
left: left,
op: opAND,
right: right,
}
}
func (left Predicate) Or(right Predicate) Predicate {
return Predicate{
left: left,
op: opOR,
right: right,
}
}
func Not(right Predicate) Predicate {
return Predicate{
op: opNot,
right: right,
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mosache/YFrame.git
git@gitee.com:mosache/YFrame.git
mosache
YFrame
YFrame
v0.1.103

搜索帮助

0d507c66 1850385 C8b1a773 1850385