mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
vendor: bump yunion.io/x/sqlchemy
This commit is contained in:
@@ -146,7 +146,7 @@ require (
|
||||
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
|
||||
yunion.io/x/pkg v0.0.0-20201028134817-3ed15ee169bc
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/sqlchemy v0.0.0-20201029091740-cd5e77b56d4b
|
||||
yunion.io/x/sqlchemy v0.0.0-20201116041103-013e56cab959
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
|
||||
)
|
||||
|
||||
|
||||
@@ -1142,5 +1142,7 @@ yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8
|
||||
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
|
||||
yunion.io/x/sqlchemy v0.0.0-20201029091740-cd5e77b56d4b h1:xBAzDPvvmsOBjxAj0PLHMNLVdPNOlYFHAm7T3IZ2ehs=
|
||||
yunion.io/x/sqlchemy v0.0.0-20201029091740-cd5e77b56d4b/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/sqlchemy v0.0.0-20201116041103-013e56cab959 h1:42hMtiEXrGgSf2aS+LE5FNK9i3FzKwyaPgYoX0rD6NQ=
|
||||
yunion.io/x/sqlchemy v0.0.0-20201116041103-013e56cab959/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
|
||||
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
|
||||
|
||||
Vendored
+1
-1
@@ -1110,7 +1110,7 @@ yunion.io/x/pkg/util/workqueue
|
||||
yunion.io/x/pkg/utils
|
||||
# yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
|
||||
yunion.io/x/s3cli
|
||||
# yunion.io/x/sqlchemy v0.0.0-20201029091740-cd5e77b56d4b
|
||||
# yunion.io/x/sqlchemy v0.0.0-20201116041103-013e56cab959
|
||||
yunion.io/x/sqlchemy
|
||||
# yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
|
||||
yunion.io/x/structarg
|
||||
|
||||
+20
@@ -514,3 +514,23 @@ func Between(f IQueryField, r1, r2 interface{}) ICondition {
|
||||
c := SBetweenCondition{NewTripleCondition(f, r1, r2)}
|
||||
return &c
|
||||
}
|
||||
|
||||
type STrueCondition struct{}
|
||||
|
||||
func (t *STrueCondition) WhereClause() string {
|
||||
return "1"
|
||||
}
|
||||
|
||||
func (t *STrueCondition) Variables() []interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
type SFalseCondition struct{}
|
||||
|
||||
func (t *SFalseCondition) WhereClause() string {
|
||||
return "0"
|
||||
}
|
||||
|
||||
func (t *SFalseCondition) Variables() []interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
+8
@@ -31,6 +31,14 @@ func (tq *SQuery) Filter(cond ICondition) *SQuery {
|
||||
return tq
|
||||
}
|
||||
|
||||
func (tq *SQuery) FilterByTrue() *SQuery {
|
||||
return tq.Filter(&STrueCondition{})
|
||||
}
|
||||
|
||||
func (tq *SQuery) FilterByFalse() *SQuery {
|
||||
return tq.Filter(&SFalseCondition{})
|
||||
}
|
||||
|
||||
func (q *SQuery) Like(f string, v string) *SQuery {
|
||||
cond := Like(q.Field(f), v)
|
||||
return q.Filter(cond)
|
||||
|
||||
Reference in New Issue
Block a user