summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/query_index_create.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-01-14 14:23:28 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-14 14:23:28 +0000
commitb8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 (patch)
tree68eaf966c80237e18993e887c8583355f0943ca7 /vendor/github.com/uptrace/bun/query_index_create.go
parent[chore] better dns validation (#3644) (diff)
downloadgotosocial-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_create.go')
-rw-r--r--vendor/github.com/uptrace/bun/query_index_create.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/uptrace/bun/query_index_create.go b/vendor/github.com/uptrace/bun/query_index_create.go
index 11824cfa4..ad1905cc3 100644
--- a/vendor/github.com/uptrace/bun/query_index_create.go
+++ b/vendor/github.com/uptrace/bun/query_index_create.go
@@ -20,6 +20,7 @@ type CreateIndexQuery struct {
index schema.QueryWithArgs
using schema.QueryWithArgs
include []schema.QueryWithArgs
+ comment string
}
var _ Query = (*CreateIndexQuery)(nil)
@@ -149,6 +150,14 @@ func (q *CreateIndexQuery) WhereOr(query string, args ...interface{}) *CreateInd
//------------------------------------------------------------------------------
+// Comment adds a comment to the query, wrapped by /* ... */.
+func (q *CreateIndexQuery) Comment(comment string) *CreateIndexQuery {
+ q.comment = comment
+ return q
+}
+
+//------------------------------------------------------------------------------
+
func (q *CreateIndexQuery) Operation() string {
return "CREATE INDEX"
}
@@ -158,6 +167,8 @@ func (q *CreateIndexQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []by
return nil, q.err
}
+ b = appendComment(b, q.comment)
+
b = append(b, "CREATE "...)
if q.unique {