mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 02:52:25 -06:00
bumps our uptrace/bun dependencies to v1.2.10 (#3865)
This commit is contained in:
parent
97adf00cd4
commit
12d4d36bc8
37 changed files with 518 additions and 225 deletions
36
vendor/github.com/uptrace/bun/dialect/pgdialect/parser.go
generated
vendored
36
vendor/github.com/uptrace/bun/dialect/pgdialect/parser.go
generated
vendored
|
|
@ -105,3 +105,39 @@ func (p *pgparser) ReadRange(ch byte) ([]byte, error) {
|
|||
|
||||
return p.buf, nil
|
||||
}
|
||||
|
||||
func (p *pgparser) ReadJSON() ([]byte, error) {
|
||||
p.Unread()
|
||||
|
||||
c, err := p.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p.buf = p.buf[:0]
|
||||
|
||||
depth := 0
|
||||
for {
|
||||
switch c {
|
||||
case '{':
|
||||
depth++
|
||||
case '}':
|
||||
depth--
|
||||
}
|
||||
|
||||
p.buf = append(p.buf, c)
|
||||
|
||||
if depth == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
next, err := p.ReadByte()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
c = next
|
||||
}
|
||||
|
||||
return p.buf, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue