mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 01:22:25 -05:00
[chore] update bun + extras v1.1.16 -> v1.1.17 (#2534)
This commit is contained in:
parent
a43ce99da9
commit
6433a50582
53 changed files with 1426 additions and 294 deletions
20
vendor/github.com/uptrace/bun/dialect/sqlitedialect/dialect.go
generated
vendored
20
vendor/github.com/uptrace/bun/dialect/sqlitedialect/dialect.go
generated
vendored
|
|
@ -39,6 +39,7 @@ func New() *Dialect {
|
|||
feature.InsertOnConflict |
|
||||
feature.TableNotExists |
|
||||
feature.SelectExists |
|
||||
feature.AutoIncrement |
|
||||
feature.CompositeIn
|
||||
return d
|
||||
}
|
||||
|
|
@ -91,6 +92,25 @@ func (d *Dialect) DefaultVarcharLen() int {
|
|||
return 0
|
||||
}
|
||||
|
||||
// AppendSequence adds AUTOINCREMENT keyword to the column definition. As per [documentation],
|
||||
// AUTOINCREMENT is only valid for INTEGER PRIMARY KEY, and this method will be a noop for other columns.
|
||||
//
|
||||
// Because this is a valid construct:
|
||||
// CREATE TABLE ("id" INTEGER PRIMARY KEY AUTOINCREMENT);
|
||||
// and this is not:
|
||||
// CREATE TABLE ("id" INTEGER AUTOINCREMENT, PRIMARY KEY ("id"));
|
||||
// AppendSequence adds a primary key constraint as a *side-effect*. Callers should expect it to avoid building invalid SQL.
|
||||
// SQLite also [does not support] AUTOINCREMENT column in composite primary keys.
|
||||
//
|
||||
// [documentation]: https://www.sqlite.org/autoinc.html
|
||||
// [does not support]: https://stackoverflow.com/a/6793274/14726116
|
||||
func (d *Dialect) AppendSequence(b []byte, table *schema.Table, field *schema.Field) []byte {
|
||||
if field.IsPK && len(table.PKs) == 1 && field.CreateTableSQLType == sqltype.Integer {
|
||||
b = append(b, " PRIMARY KEY AUTOINCREMENT"...)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func fieldSQLType(field *schema.Field) string {
|
||||
switch field.DiscoveredSQLType {
|
||||
case sqltype.SmallInt, sqltype.BigInt:
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go
generated
vendored
2
vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go
generated
vendored
|
|
@ -2,5 +2,5 @@ package sqlitedialect
|
|||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.1.16"
|
||||
return "1.1.17"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue