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_index_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_index_drop.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/query_index_drop.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/query_index_drop.go b/vendor/github.com/uptrace/bun/query_index_drop.go index ae28e7956..a2a23fb8a 100644 --- a/vendor/github.com/uptrace/bun/query_index_drop.go +++ b/vendor/github.com/uptrace/bun/query_index_drop.go @@ -15,7 +15,8 @@ type DropIndexQuery struct { concurrently bool ifExists bool - index schema.QueryWithArgs + index schema.QueryWithArgs + comment string } var _ Query = (*DropIndexQuery)(nil) @@ -74,6 +75,14 @@ func (q *DropIndexQuery) Index(query string, args ...interface{}) *DropIndexQuer //------------------------------------------------------------------------------ +// Comment adds a comment to the query, wrapped by /* ... */. +func (q *DropIndexQuery) Comment(comment string) *DropIndexQuery { + q.comment = comment + return q +} + +//------------------------------------------------------------------------------ + func (q *DropIndexQuery) Operation() string { return "DROP INDEX" } @@ -83,6 +92,8 @@ func (q *DropIndexQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byte return nil, q.err } + b = appendComment(b, q.comment) + b = append(b, "DROP INDEX "...) if q.concurrently { |