diff options
author | 2025-01-14 14:23:28 +0000 | |
---|---|---|
committer | 2025-01-14 14:23:28 +0000 | |
commit | b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 (patch) | |
tree | 68eaf966c80237e18993e887c8583355f0943ca7 /vendor/github.com/uptrace/bun/query_table_drop.go | |
parent | [chore] better dns validation (#3644) (diff) | |
download | gotosocial-b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9.tar.xz |
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
Diffstat (limited to 'vendor/github.com/uptrace/bun/query_table_drop.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/query_table_drop.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/query_table_drop.go b/vendor/github.com/uptrace/bun/query_table_drop.go index a92014515..01f000293 100644 --- a/vendor/github.com/uptrace/bun/query_table_drop.go +++ b/vendor/github.com/uptrace/bun/query_table_drop.go @@ -13,6 +13,7 @@ type DropTableQuery struct { cascadeQuery ifExists bool + comment string } var _ Query = (*DropTableQuery)(nil) @@ -80,6 +81,14 @@ func (q *DropTableQuery) Restrict() *DropTableQuery { //------------------------------------------------------------------------------ +// Comment adds a comment to the query, wrapped by /* ... */. +func (q *DropTableQuery) Comment(comment string) *DropTableQuery { + q.comment = comment + return q +} + +//------------------------------------------------------------------------------ + func (q *DropTableQuery) Operation() string { return "DROP TABLE" } @@ -89,6 +98,8 @@ func (q *DropTableQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byte return nil, q.err } + b = appendComment(b, q.comment) + b = append(b, "DROP TABLE "...) if q.ifExists { b = append(b, "IF EXISTS "...) |