mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-16 11:23:01 -06:00
bumps uptrace/bun dependencies to v1.2.6 (#3569)
This commit is contained in:
parent
a444adee97
commit
3fceb5fc1a
68 changed files with 6517 additions and 194 deletions
12
vendor/github.com/uptrace/bun/schema/tables.go
generated
vendored
12
vendor/github.com/uptrace/bun/schema/tables.go
generated
vendored
|
|
@ -77,6 +77,7 @@ func (t *Tables) InProgress(typ reflect.Type) *Table {
|
|||
return table
|
||||
}
|
||||
|
||||
// ByModel gets the table by its Go name.
|
||||
func (t *Tables) ByModel(name string) *Table {
|
||||
var found *Table
|
||||
t.tables.Range(func(typ reflect.Type, table *Table) bool {
|
||||
|
|
@ -89,6 +90,7 @@ func (t *Tables) ByModel(name string) *Table {
|
|||
return found
|
||||
}
|
||||
|
||||
// ByName gets the table by its SQL name.
|
||||
func (t *Tables) ByName(name string) *Table {
|
||||
var found *Table
|
||||
t.tables.Range(func(typ reflect.Type, table *Table) bool {
|
||||
|
|
@ -100,3 +102,13 @@ func (t *Tables) ByName(name string) *Table {
|
|||
})
|
||||
return found
|
||||
}
|
||||
|
||||
// All returns all registered tables.
|
||||
func (t *Tables) All() []*Table {
|
||||
var found []*Table
|
||||
t.tables.Range(func(typ reflect.Type, table *Table) bool {
|
||||
found = append(found, table)
|
||||
return true
|
||||
})
|
||||
return found
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue