Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeInt = "int" TypeUUID = "uuid" TypeFloat = "float" )
Variables ¶
View Source
var ( ColumnDefaultValueStringRegexp = regexp.MustCompile(`^'(.*)'$`) ColumnDefaultValueExpressionRegexp = regexp.MustCompile("^`(.*)`$") )
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { Name string Type string Settings ColumnSettings }
func (*Column) AsNullable ¶
func (c *Column) AsNullable()
type ColumnDefault ¶
type ColumnDefault struct { Type ColumnDefaultType Value string }
func (*ColumnDefault) Render ¶
func (d *ColumnDefault) Render() string
type ColumnDefaultType ¶
type ColumnDefaultType int
const ( ColumnDefaultTypeNumber ColumnDefaultType = iota ColumnDefaultTypeString ColumnDefaultTypeExpression ColumnDefaultTypeBoolean )
type ColumnSettings ¶
type ColumnSettings struct { PrimaryKey bool Increment bool Note string Unique bool Default ColumnDefault // contains filtered or unexported fields }
func (*ColumnSettings) Render ¶
func (s *ColumnSettings) Render() string
type EnumValue ¶
type EnumValue struct { Name string Settings EnumValueSettings }
type EnumValueSettings ¶
type EnumValueSettings struct {
Note string
}
func (*EnumValueSettings) Render ¶
func (s *EnumValueSettings) Render() string
type RelationSubject ¶
func ParseRelationSubject ¶
func ParseRelationSubject(subject string) (*RelationSubject, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.