diff options
author | 2025-03-09 17:47:56 +0100 | |
---|---|---|
committer | 2025-03-10 01:59:49 +0100 | |
commit | 3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch) | |
tree | f61faa581feaaeaba2542b9f2b8234a590684413 /vendor/github.com/uptrace/bun/migrate/sqlschema/table.go | |
parent | [chore] update URLs to forked source (diff) | |
download | gotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz |
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/uptrace/bun/migrate/sqlschema/table.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/migrate/sqlschema/table.go | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/vendor/github.com/uptrace/bun/migrate/sqlschema/table.go b/vendor/github.com/uptrace/bun/migrate/sqlschema/table.go deleted file mode 100644 index ec9b77f69..000000000 --- a/vendor/github.com/uptrace/bun/migrate/sqlschema/table.go +++ /dev/null @@ -1,60 +0,0 @@ -package sqlschema - -import ( - "github.com/uptrace/bun/internal/ordered" -) - -type Table interface { - GetSchema() string - GetName() string - GetColumns() *ordered.Map[string, Column] - GetPrimaryKey() *PrimaryKey - GetUniqueConstraints() []Unique -} - -var _ Table = (*BaseTable)(nil) - -// BaseTable is a base table definition. -// -// Dialects and only dialects can use it to implement the Table interface. -// Other packages must use the Table interface. -type BaseTable struct { - Schema string - Name string - - // ColumnDefinitions map each column name to the column definition. - Columns *ordered.Map[string, Column] - - // PrimaryKey holds the primary key definition. - // A nil value means that no primary key is defined for the table. - PrimaryKey *PrimaryKey - - // UniqueConstraints defined on the table. - UniqueConstraints []Unique -} - -// PrimaryKey represents a primary key constraint defined on 1 or more columns. -type PrimaryKey struct { - Name string - Columns Columns -} - -func (td *BaseTable) GetSchema() string { - return td.Schema -} - -func (td *BaseTable) GetName() string { - return td.Name -} - -func (td *BaseTable) GetColumns() *ordered.Map[string, Column] { - return td.Columns -} - -func (td *BaseTable) GetPrimaryKey() *PrimaryKey { - return td.PrimaryKey -} - -func (td *BaseTable) GetUniqueConstraints() []Unique { - return td.UniqueConstraints -} |