Documentation
¶
Index ¶
- func DBType(t string) string
- func IsFieldType(t string) bool
- func MySQLType(t string) string
- func TimeFormat(t time.Time) string
- func TimeParse(s string) time.Time
- func TimeParseLocalTime(s string) time.Time
- func TimeToLocalTime(c time.Time) string
- type Convert
- type Field
- func (f *Field) Attribute(name string) interface{}
- func (f *Field) Comment() string
- func (f *Field) DBColumn() string
- func (f *Field) DBDefault() string
- func (f *Field) DBNull() string
- func (f *Field) DBType() string
- func (f *Field) IsAutoIncrement() bool
- func (f *Field) IsEncode() bool
- func (f *Field) IsNullable() bool
- func (f *Field) IsPassword() bool
- func (f *Field) IsPrimary() bool
- func (f *Field) IsText() bool
- func (f *Field) IsTime() bool
- func (f *Field) Name() string
- func (f *Field) SQLNullType() string
- func (f *Field) SQLNullValueField() string
- func (f *Field) TagValue(key string) string
- func (f *Field) Tags(keys []string) string
- func (f *Field) Type(language string) string
- func (f *Field) Value() string
- type FieldD
- type Index
- type IndexD
- type Object
- type Primary
- type Query
- type Table
- func (tb *Table) Attribute(name string) interface{}
- func (tb *Table) AutoIncrement(defautBegin string) string
- func (tb *Table) Comment() string
- func (tb *Table) DBCharset(defaultCharset string) string
- func (tb *Table) DBEngine(defaultEngine string) string
- func (tb *Table) DBName() string
- func (tb *Table) FieldByName(name string) *Field
- func (tb *Table) Fields() []*Field
- func (tb *Table) IndexByName(name string) *Index
- func (tb *Table) Indexes() []*Index
- func (tb *Table) Name() string
- func (tb *Table) PrimaryKey() *Primary
- func (tb *Table) Tags() []string
- func (tb *Table) UniqueByName(name string) *Unique
- func (tb *Table) Uniques() []*Unique
- type Unique
- type UniqueD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFieldType ¶
func TimeFormat ¶
func TimeParseLocalTime ¶
func TimeToLocalTime ¶
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (*Field) IsAutoIncrement ¶
func (*Field) IsNullable ¶
func (*Field) IsPassword ¶
func (*Field) SQLNullType ¶
func (*Field) SQLNullValueField ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) JoinFields ¶
type Object ¶
type Object struct {
Version string `yaml:"version,omitempty"`
Object string `yaml:"object,omitempty"`
Name string `yaml:"name,omitempty"`
Comment string `yaml:"comment,omitempty"`
Fields []*FieldD `yaml:"fields,omitempty"`
Uniques []*UniqueD `yaml:"uniques,omitempty"`
Indexes []*IndexD `yaml:"indexes,omitempty"`
Primary []string `yaml:"primary,omitempty"`
Tags []string `yaml:"tags,omitempty"`
Attributes map[string]interface{} `yaml:"attributes,omitempty"`
}
type Primary ¶
type Primary struct {
// contains filtered or unexported fields
}
func (*Primary) JoinFields ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) FieldByName ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) AutoIncrement ¶
func (*Table) FieldByName ¶
func (*Table) IndexByName ¶
func (*Table) PrimaryKey ¶
func (*Table) UniqueByName ¶
type Unique ¶
type Unique struct {
// contains filtered or unexported fields
}
func (*Unique) JoinFields ¶
Click to show internal directories.
Click to hide internal directories.