[chore]: Bump github.com/uptrace/bun/dialect/pgdialect

Bumps [github.com/uptrace/bun/dialect/pgdialect](https://github.com/uptrace/bun) from 1.2.9 to 1.2.10.
- [Release notes](https://github.com/uptrace/bun/releases)
- [Changelog](https://github.com/uptrace/bun/blob/v1.2.10/CHANGELOG.md)
- [Commits](https://github.com/uptrace/bun/compare/v1.2.9...v1.2.10)

---
updated-dependencies:
- dependency-name: github.com/uptrace/bun/dialect/pgdialect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2025-02-24 06:54:55 +00:00 committed by GitHub
commit 8d167498f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 487 additions and 209 deletions

View file

@ -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
}