From b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:23:28 +0000 Subject: bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645) --- vendor/github.com/uptrace/bun/query_column_drop.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'vendor/github.com/uptrace/bun/query_column_drop.go') diff --git a/vendor/github.com/uptrace/bun/query_column_drop.go b/vendor/github.com/uptrace/bun/query_column_drop.go index 24fc93cfd..986bffed3 100644 --- a/vendor/github.com/uptrace/bun/query_column_drop.go +++ b/vendor/github.com/uptrace/bun/query_column_drop.go @@ -11,6 +11,8 @@ import ( type DropColumnQuery struct { baseQuery + + comment string } var _ Query = (*DropColumnQuery)(nil) @@ -85,6 +87,14 @@ func (q *DropColumnQuery) ColumnExpr(query string, args ...interface{}) *DropCol //------------------------------------------------------------------------------ +// Comment adds a comment to the query, wrapped by /* ... */. +func (q *DropColumnQuery) Comment(comment string) *DropColumnQuery { + q.comment = comment + return q +} + +//------------------------------------------------------------------------------ + func (q *DropColumnQuery) Operation() string { return "DROP COLUMN" } @@ -93,6 +103,9 @@ func (q *DropColumnQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byt if q.err != nil { return nil, q.err } + + b = appendComment(b, q.comment) + if len(q.columns) != 1 { return nil, fmt.Errorf("bun: DropColumnQuery requires exactly one column") } -- cgit v1.2.3