Documentation ¶
Index ¶
- type Builder
- type ColumnBuilder
- type ForeignKeyBuilder
- type IndexBuilder
- type Table
- func (t *Table) Bool(name string) *ColumnBuilder
- func (t *Table) Float(name string) *ColumnBuilder
- func (t *Table) ForeignKey(localKey, relatedTable, relatedKey string)
- func (t *Table) Index(name string) *IndexBuilder
- func (t *Table) Int(name string) *ColumnBuilder
- func (t *Table) JSON(name string) *ColumnBuilder
- func (t *Table) OfType(datatype dialects.DataType, name string) *ColumnBuilder
- func (t *Table) String(name string) *ColumnBuilder
- func (t *Table) UInt(name string) *ColumnBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
*Table
}
func CreateTable ¶
func FromStruct ¶ added in v0.16.5
func (*Builder) AddColumns ¶
func (b *Builder) AddColumns(columns ...*ColumnBuilder) *Builder
func (*Builder) Columns ¶
func (b *Builder) Columns(columns ...*ColumnBuilder) *Builder
type ColumnBuilder ¶
type ColumnBuilder struct {
// contains filtered or unexported fields
}
func (*ColumnBuilder) NotNullable ¶ added in v0.16.5
func (b *ColumnBuilder) NotNullable() *ColumnBuilder
func (*ColumnBuilder) Nullable ¶ added in v0.16.5
func (b *ColumnBuilder) Nullable() *ColumnBuilder
type ForeignKeyBuilder ¶ added in v0.16.5
type ForeignKeyBuilder struct {
// contains filtered or unexported fields
}
type IndexBuilder ¶ added in v0.16.5
type IndexBuilder struct {
// contains filtered or unexported fields
}
func (*IndexBuilder) AddColumn ¶ added in v0.16.5
func (b *IndexBuilder) AddColumn(c string) *IndexBuilder
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) Bool ¶ added in v0.16.5
func (t *Table) Bool(name string) *ColumnBuilder
func (*Table) Float ¶
func (t *Table) Float(name string) *ColumnBuilder
func (*Table) ForeignKey ¶ added in v0.16.5
func (*Table) Index ¶ added in v0.16.5
func (t *Table) Index(name string) *IndexBuilder
func (*Table) Int ¶
func (t *Table) Int(name string) *ColumnBuilder
func (*Table) JSON ¶ added in v0.16.5
func (t *Table) JSON(name string) *ColumnBuilder
func (*Table) OfType ¶ added in v0.16.5
func (t *Table) OfType(datatype dialects.DataType, name string) *ColumnBuilder
func (*Table) String ¶
func (t *Table) String(name string) *ColumnBuilder
func (*Table) UInt ¶ added in v0.16.5
func (t *Table) UInt(name string) *ColumnBuilder
Click to show internal directories.
Click to hide internal directories.