From cf02cd7ba0c94165743660cf30f0cbb5a73a385e Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Sat, 20 May 2017 04:48:22 -0400 Subject: Fix and test for delete user (#1713) * Fix and test for delete user * Run updates in batches * Unit test --- vendor/github.com/go-xorm/builder/cond_in.go | 6 ++---- vendor/github.com/go-xorm/builder/cond_notin.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'vendor/github.com/go-xorm') diff --git a/vendor/github.com/go-xorm/builder/cond_in.go b/vendor/github.com/go-xorm/builder/cond_in.go index 71093e4b49..f6366d35c2 100644 --- a/vendor/github.com/go-xorm/builder/cond_in.go +++ b/vendor/github.com/go-xorm/builder/cond_in.go @@ -23,10 +23,8 @@ func In(col string, values ...interface{}) Cond { } func (condIn condIn) handleBlank(w Writer) error { - if _, err := fmt.Fprintf(w, "%s IN ()", condIn.col); err != nil { - return err - } - return nil + _, err := fmt.Fprint(w, "0=1") + return err } func (condIn condIn) WriteTo(w Writer) error { diff --git a/vendor/github.com/go-xorm/builder/cond_notin.go b/vendor/github.com/go-xorm/builder/cond_notin.go index 9be44cb2af..dc3ac49a35 100644 --- a/vendor/github.com/go-xorm/builder/cond_notin.go +++ b/vendor/github.com/go-xorm/builder/cond_notin.go @@ -20,10 +20,8 @@ func NotIn(col string, values ...interface{}) Cond { } func (condNotIn condNotIn) handleBlank(w Writer) error { - if _, err := fmt.Fprintf(w, "%s NOT IN ()", condNotIn.col); err != nil { - return err - } - return nil + _, err := fmt.Fprint(w, "0=0") + return err } func (condNotIn condNotIn) WriteTo(w Writer) error { -- cgit v1.2.3