2 Star 1 Fork 1

mosache/YFrame

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
predicate.go 659 Bytes
Copy Edit Raw Blame History
ヤ沒脩袮兲︶ authored 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.94

Search

0d507c66 1850385 C8b1a773 1850385