mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-08 07:51:10 -06: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
8
vendor/github.com/uptrace/bun/schema/dialect.go
generated
vendored
8
vendor/github.com/uptrace/bun/schema/dialect.go
generated
vendored
|
|
@ -31,6 +31,10 @@ type Dialect interface {
|
|||
AppendJSON(b, jsonb []byte) []byte
|
||||
AppendBool(b []byte, v bool) []byte
|
||||
|
||||
// AppendSequence adds the appropriate instruction for the driver to create a sequence
|
||||
// from which (autoincremented) values for the column will be generated.
|
||||
AppendSequence(b []byte, t *Table, f *Field) []byte
|
||||
|
||||
// DefaultVarcharLen should be returned for dialects in which specifying VARCHAR length
|
||||
// is mandatory in queries that modify the schema (CREATE TABLE / ADD COLUMN, etc).
|
||||
// Dialects that do not have such requirement may return 0, which should be interpreted so by the caller.
|
||||
|
|
@ -177,3 +181,7 @@ func (d *nopDialect) IdentQuote() byte {
|
|||
func (d *nopDialect) DefaultVarcharLen() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (d *nopDialect) AppendSequence(b []byte, _ *Table, _ *Field) []byte {
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/uptrace/bun/schema/relation.go
generated
vendored
6
vendor/github.com/uptrace/bun/schema/relation.go
generated
vendored
|
|
@ -30,6 +30,12 @@ type Relation struct {
|
|||
M2MJoinFields []*Field
|
||||
}
|
||||
|
||||
// References returns true if the table to which the Relation belongs needs to declare a foreign key constraint to create the relation.
|
||||
// For other relations, the constraint is created in either the referencing table (1:N, 'has-many' relations) or a mapping table (N:N, 'm2m' relations).
|
||||
func (r *Relation) References() bool {
|
||||
return r.Type == HasOneRelation || r.Type == BelongsToRelation
|
||||
}
|
||||
|
||||
func (r *Relation) String() string {
|
||||
return fmt.Sprintf("relation=%s", r.Field.GoName)
|
||||
}
|
||||
|
|
|
|||
5
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
5
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
|
|
@ -377,7 +377,6 @@ func (t *Table) newField(f reflect.StructField, prefix string, index []int) *Fie
|
|||
}
|
||||
if s, ok := tag.Option("default"); ok {
|
||||
field.SQLDefault = s
|
||||
field.NullZero = true
|
||||
}
|
||||
if s, ok := field.Tag.Option("type"); ok {
|
||||
field.UserSQLType = s
|
||||
|
|
@ -477,7 +476,7 @@ func (t *Table) belongsToRelation(field *Field) *Relation {
|
|||
}
|
||||
|
||||
rel := &Relation{
|
||||
Type: HasOneRelation,
|
||||
Type: BelongsToRelation,
|
||||
Field: field,
|
||||
JoinTable: joinTable,
|
||||
}
|
||||
|
|
@ -571,7 +570,7 @@ func (t *Table) hasOneRelation(field *Field) *Relation {
|
|||
|
||||
joinTable := t.dialect.Tables().Ref(field.IndirectType)
|
||||
rel := &Relation{
|
||||
Type: BelongsToRelation,
|
||||
Type: HasOneRelation,
|
||||
Field: field,
|
||||
JoinTable: joinTable,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue