aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-xorm/builder/cond_not.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-xorm/builder/cond_not.go')
-rw-r--r--vendor/github.com/go-xorm/builder/cond_not.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/go-xorm/builder/cond_not.go b/vendor/github.com/go-xorm/builder/cond_not.go
index 294a7e0728..667dfe7293 100644
--- a/vendor/github.com/go-xorm/builder/cond_not.go
+++ b/vendor/github.com/go-xorm/builder/cond_not.go
@@ -21,6 +21,18 @@ func (not Not) WriteTo(w Writer) error {
if _, err := fmt.Fprint(w, "("); err != nil {
return err
}
+ case Eq:
+ if len(not[0].(Eq)) > 1 {
+ if _, err := fmt.Fprint(w, "("); err != nil {
+ return err
+ }
+ }
+ case Neq:
+ if len(not[0].(Neq)) > 1 {
+ if _, err := fmt.Fprint(w, "("); err != nil {
+ return err
+ }
+ }
}
if err := not[0].WriteTo(w); err != nil {
@@ -32,6 +44,18 @@ func (not Not) WriteTo(w Writer) error {
if _, err := fmt.Fprint(w, ")"); err != nil {
return err
}
+ case Eq:
+ if len(not[0].(Eq)) > 1 {
+ if _, err := fmt.Fprint(w, ")"); err != nil {
+ return err
+ }
+ }
+ case Neq:
+ if len(not[0].(Neq)) > 1 {
+ if _, err := fmt.Fprint(w, ")"); err != nil {
+ return err
+ }
+ }
}
return nil