[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:
dependabot[bot] 2025-01-14 13:12:59 +00:00 committed by GitHub
commit afd5f8a80a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 631 additions and 139 deletions

View file

@ -14,6 +14,7 @@ type TruncateTableQuery struct {
cascadeQuery
continueIdentity bool
comment string
}
var _ Query = (*TruncateTableQuery)(nil)
@ -81,6 +82,14 @@ func (q *TruncateTableQuery) Restrict() *TruncateTableQuery {
//------------------------------------------------------------------------------
// Comment adds a comment to the query, wrapped by /* ... */.
func (q *TruncateTableQuery) Comment(comment string) *TruncateTableQuery {
q.comment = comment
return q
}
//------------------------------------------------------------------------------
func (q *TruncateTableQuery) Operation() string {
return "TRUNCATE TABLE"
}
@ -92,6 +101,8 @@ func (q *TruncateTableQuery) AppendQuery(
return nil, q.err
}
b = appendComment(b, q.comment)
if !fmter.HasFeature(feature.TableTruncate) {
b = append(b, "DELETE FROM "...)
@ -110,7 +121,7 @@ func (q *TruncateTableQuery) AppendQuery(
return nil, err
}
if q.db.features.Has(feature.TableIdentity) {
if q.db.HasFeature(feature.TableIdentity) {
if q.continueIdentity {
b = append(b, " CONTINUE IDENTITY"...)
} else {