bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)

This commit is contained in:
kim
2025-01-14 14:23:28 +00:00
committed by GitHub
parent e77c7e16b6
commit b8ef9fc4bc
89 changed files with 907 additions and 4123 deletions

View File

@ -14,6 +14,7 @@ type ValuesQuery struct {
customValueQuery
withOrder bool
comment string
}
var (
@ -64,6 +65,12 @@ func (q *ValuesQuery) WithOrder() *ValuesQuery {
return q
}
// Comment adds a comment to the query, wrapped by /* ... */.
func (q *ValuesQuery) Comment(comment string) *ValuesQuery {
q.comment = comment
return q
}
func (q *ValuesQuery) AppendNamedArg(fmter schema.Formatter, b []byte, name string) ([]byte, bool) {
switch name {
case "Columns":
@ -121,6 +128,8 @@ func (q *ValuesQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []byte, e
return nil, errNilModel
}
b = appendComment(b, q.comment)
fmter = formatterWithModel(fmter, q)
if q.tableModel != nil {
@ -145,7 +154,7 @@ func (q *ValuesQuery) appendQuery(
fields []*schema.Field,
) (_ []byte, err error) {
b = append(b, "VALUES "...)
if q.db.features.Has(feature.ValuesRow) {
if q.db.HasFeature(feature.ValuesRow) {
b = append(b, "ROW("...)
} else {
b = append(b, '(')
@ -168,7 +177,7 @@ func (q *ValuesQuery) appendQuery(
for i := 0; i < sliceLen; i++ {
if i > 0 {
b = append(b, "), "...)
if q.db.features.Has(feature.ValuesRow) {
if q.db.HasFeature(feature.ValuesRow) {
b = append(b, "ROW("...)
} else {
b = append(b, '(')