forked from forgejo/forgejo
Fix label count (#8267)
* fix label count * fix vendor * fix import order * update xorm to fix bug * fix tests * fix mssql bug
This commit is contained in:
parent
7cccada51e
commit
29dda47cbb
38 changed files with 959 additions and 580 deletions
22
vendor/xorm.io/builder/doc.go
generated
vendored
22
vendor/xorm.io/builder/doc.go
generated
vendored
|
@ -8,13 +8,13 @@ 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
|
||||
go get xorm.io/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"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Eq{"a":1})
|
||||
// a=? [1]
|
||||
|
@ -31,7 +31,7 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
2. Neq is the same to Eq
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Neq{"a":1})
|
||||
// a<>? [1]
|
||||
|
@ -48,7 +48,7 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
3. Gt, Gte, Lt, Lte
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Gt{"a", 1}.And(Gte{"b", 2}))
|
||||
// a>? AND b>=? [1, 2]
|
||||
|
@ -57,14 +57,14 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
4. Like
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Like{"a", "c"})
|
||||
// a LIKE ? [%c%]
|
||||
|
||||
5. Expr you can customerize your sql with Expr
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Expr("a = ? ", 1))
|
||||
// a = ? [1]
|
||||
|
@ -73,7 +73,7 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
6. In and NotIn
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(In("a", 1, 2, 3))
|
||||
// a IN (?,?,?) [1,2,3]
|
||||
|
@ -84,7 +84,7 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
7. IsNull and NotNull
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(IsNull{"a"})
|
||||
// a IS NULL []
|
||||
|
@ -93,14 +93,14 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
8. And(conds ...Cond), And can connect one or more condtions via AND
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(And(Eq{"a":1}, Like{"b", "c"}, Neq{"d", 2}))
|
||||
// a=? AND b LIKE ? AND d<>? [1, %c%, 2]
|
||||
|
||||
9. Or(conds ...Cond), Or can connect one or more conditions via Or
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Or(Eq{"a":1}, Like{"b", "c"}, Neq{"d", 2}))
|
||||
// a=? OR b LIKE ? OR d<>? [1, %c%, 2]
|
||||
|
@ -109,7 +109,7 @@ WARNNING: Currently, only query conditions are supported. Below is the supported
|
|||
|
||||
10. Between
|
||||
|
||||
import . "github.com/go-xorm/builder"
|
||||
import . "xorm.io/builder"
|
||||
|
||||
sql, args, _ := ToSQL(Between("a", 1, 2))
|
||||
// a BETWEEN 1 AND 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue