mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 03:03:16 -06:00
[chore]: Bump github.com/uptrace/bun/dialect/sqlitedialect
Bumps [github.com/uptrace/bun/dialect/sqlitedialect](https://github.com/uptrace/bun) from 1.2.6 to 1.2.8. - [Release notes](https://github.com/uptrace/bun/releases) - [Changelog](https://github.com/uptrace/bun/blob/master/CHANGELOG.md) - [Commits](https://github.com/uptrace/bun/compare/v1.2.6...v1.2.8) --- updated-dependencies: - dependency-name: github.com/uptrace/bun/dialect/sqlitedialect dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
b95498b8c2
commit
afd5f8a80a
48 changed files with 631 additions and 139 deletions
22
vendor/github.com/uptrace/bun/util.go
generated
vendored
22
vendor/github.com/uptrace/bun/util.go
generated
vendored
|
|
@ -1,6 +1,10 @@
|
|||
package bun
|
||||
|
||||
import "reflect"
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func indirect(v reflect.Value) reflect.Value {
|
||||
switch v.Kind() {
|
||||
|
|
@ -66,3 +70,19 @@ func sliceElemType(v reflect.Value) reflect.Type {
|
|||
}
|
||||
return indirectType(elemType)
|
||||
}
|
||||
|
||||
// appendComment adds comment in the header of the query into buffer
|
||||
func appendComment(b []byte, name string) []byte {
|
||||
if name == "" {
|
||||
return b
|
||||
}
|
||||
name = strings.Map(func(r rune) rune {
|
||||
if r == '\x00' {
|
||||
return -1
|
||||
}
|
||||
return r
|
||||
}, name)
|
||||
name = strings.ReplaceAll(name, `/*`, `/\*`)
|
||||
name = strings.ReplaceAll(name, `*/`, `*\/`)
|
||||
return append(b, fmt.Sprintf("/* %s */ ", name)...)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue