mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 00:03:02 -06:00
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
This commit is contained in:
parent
e77c7e16b6
commit
b8ef9fc4bc
89 changed files with 907 additions and 4123 deletions
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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue