mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)
* upgrade xorm to v1.0.1 * fix start fail with postgres Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
10
vendor/xorm.io/xorm/schemas/quote.go
generated
vendored
10
vendor/xorm.io/xorm/schemas/quote.go
generated
vendored
@@ -107,16 +107,17 @@ func findStart(value string, start int) int {
|
||||
return start
|
||||
}
|
||||
|
||||
var k int
|
||||
var k = -1
|
||||
for j := start; j < len(value); j++ {
|
||||
if value[j] != ' ' {
|
||||
k = j
|
||||
break
|
||||
}
|
||||
}
|
||||
if k-1 == len(value) {
|
||||
if k == -1 {
|
||||
return len(value)
|
||||
}
|
||||
|
||||
if (value[k] == 'A' || value[k] == 'a') && (value[k+1] == 'S' || value[k+1] == 's') {
|
||||
k = k + 2
|
||||
}
|
||||
@@ -178,8 +179,11 @@ func (q Quoter) QuoteTo(buf *strings.Builder, value string) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
var nextEnd = findWord(value, start)
|
||||
if start == len(value) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var nextEnd = findWord(value, start)
|
||||
if err := q.quoteWordTo(buf, value[start:nextEnd]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user