From 613139e7bef81d3573e7988a47eb6765f3de347a Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 23 Oct 2019 23:03:17 -0700 Subject: Enable Go modules (#5835) * Remove vendor * Enable Go modules * ci: add command to fetch dependencies * ci: update setting * ci: update settings * Require Go 1.11 * Rename module name to gogs.io/gogs --- vendor/github.com/go-xorm/builder/doc.go | 120 ------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 vendor/github.com/go-xorm/builder/doc.go (limited to 'vendor/github.com/go-xorm/builder/doc.go') diff --git a/vendor/github.com/go-xorm/builder/doc.go b/vendor/github.com/go-xorm/builder/doc.go deleted file mode 100644 index 162b150f..00000000 --- a/vendor/github.com/go-xorm/builder/doc.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2016 The XORM Authors. All rights reserved. -// Use of this source code is governed by a BSD -// license that can be found in the LICENSE file. - -/* - -Package builder is a simple and powerful sql builder for Go. - -Make sure you have installed Go 1.1+ and then: - - go get github.com/go-xorm/builder - -WARNNING: Currently, only query conditions are supported. Below is the supported conditions. - -1. Eq is a redefine of a map, you can give one or more conditions to Eq - - import . "github.com/go-xorm/builder" - - sql, args, _ := ToSQL(Eq{"a":1}) - // a=? [1] - sql, args, _ := ToSQL(Eq{"b":"c"}.And(Eq{"c": 0})) - // b=? AND c=? ["c", 0] - sql, args, _ := ToSQL(Eq{"b":"c", "c":0}) - // b=? AND c=? ["c", 0] - sql, args, _ := ToSQL(Eq{"b":"c"}.Or(Eq{"b":"d"})) - // b=? OR b=? ["c", "d"] - sql, args, _ := ToSQL(Eq{"b": []string{"c", "d"}}) - // b IN (?,?) ["c", "d"] - sql, args, _ := ToSQL(Eq{"b": 1, "c":[]int{2, 3}}) - // b=? AND c IN (?,?) [1, 2, 3] - -2. Neq is the same to Eq - - import . "github.com/go-xorm/builder" - - sql, args, _ := ToSQL(Neq{"a":1}) - // a<>? [1] - sql, args, _ := ToSQL(Neq{"b":"c"}.And(Neq{"c": 0})) - // b<>? AND c<>? ["c", 0] - sql, args, _ := ToSQL(Neq{"b":"c", "c":0}) - // b<>? AND c<>? ["c", 0] - sql, args, _ := ToSQL(Neq{"b":"c"}.Or(Neq{"b":"d"})) - // b<>? OR b<>? ["c", "d"] - sql, args, _ := ToSQL(Neq{"b": []string{"c", "d"}}) - // b NOT IN (?,?) ["c", "d"] - sql, args, _ := ToSQL(Neq{"b": 1, "c":[]int{2, 3}}) - // b<>? AND c NOT IN (?,?) [1, 2, 3] - -3. Gt, Gte, Lt, Lte - - import . "github.com/go-xorm/builder" - - sql, args, _ := ToSQL(Gt{"a", 1}.And(Gte{"b", 2})) - // a>? AND b>=? [1, 2] - sql, args, _ := ToSQL(Lt{"a", 1}.Or(Lte{"b", 2})) - // a? [1, %c%, 2] - -9. Or(conds ...Cond), Or can connect one or more conditions via Or - - import . "github.com/go-xorm/builder" - - sql, args, _ := ToSQL(Or(Eq{"a":1}, Like{"b", "c"}, Neq{"d", 2})) - // a=? OR b LIKE ? OR d<>? [1, %c%, 2] - sql, args, _ := ToSQL(Or(Eq{"a":1}, And(Like{"b", "c"}, Neq{"d", 2}))) - // a=? OR (b LIKE ? AND d<>?) [1, %c%, 2] - -10. Between - - import . "github.com/go-xorm/builder" - - sql, args, _ := ToSQL(Between("a", 1, 2)) - // a BETWEEN 1 AND 2 - -11. define yourself conditions -Since Cond is a interface, you can define yourself conditions and compare with them -*/ -package builder -- cgit v1.2.3