mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
This commit is contained in:
13
vendor/github.com/uptrace/bun/query_table_truncate.go
generated
vendored
13
vendor/github.com/uptrace/bun/query_table_truncate.go
generated
vendored
@ -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 {
|
||||
|
Reference in New Issue
Block a user