mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 11:12:26 -05:00
update dependencies (#296)
This commit is contained in:
parent
2aaec82732
commit
829a934d23
124 changed files with 2453 additions and 1588 deletions
46
vendor/github.com/uptrace/bun/dialect/append.go
generated
vendored
46
vendor/github.com/uptrace/bun/dialect/append.go
generated
vendored
|
|
@ -1,10 +1,8 @@
|
|||
package dialect
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"math"
|
||||
"strconv"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/uptrace/bun/internal"
|
||||
)
|
||||
|
|
@ -48,50 +46,6 @@ func appendFloat(b []byte, v float64, bitSize int) []byte {
|
|||
}
|
||||
}
|
||||
|
||||
func AppendString(b []byte, s string) []byte {
|
||||
b = append(b, '\'')
|
||||
for _, r := range s {
|
||||
if r == '\000' {
|
||||
continue
|
||||
}
|
||||
|
||||
if r == '\'' {
|
||||
b = append(b, '\'', '\'')
|
||||
continue
|
||||
}
|
||||
|
||||
if r < utf8.RuneSelf {
|
||||
b = append(b, byte(r))
|
||||
continue
|
||||
}
|
||||
|
||||
l := len(b)
|
||||
if cap(b)-l < utf8.UTFMax {
|
||||
b = append(b, make([]byte, utf8.UTFMax)...)
|
||||
}
|
||||
n := utf8.EncodeRune(b[l:l+utf8.UTFMax], r)
|
||||
b = b[:l+n]
|
||||
}
|
||||
b = append(b, '\'')
|
||||
return b
|
||||
}
|
||||
|
||||
func AppendBytes(b, bs []byte) []byte {
|
||||
if bs == nil {
|
||||
return AppendNull(b)
|
||||
}
|
||||
|
||||
b = append(b, `'\x`...)
|
||||
|
||||
s := len(b)
|
||||
b = append(b, make([]byte, hex.EncodedLen(len(bs)))...)
|
||||
hex.Encode(b[s:], bs)
|
||||
|
||||
b = append(b, '\'')
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
func AppendIdent(b []byte, field string, quote byte) []byte {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue