Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct { Tag string Field objs.Object Type *types.SQLType // 忽略该字段 - Ignore bool // 主键 pk IsPrimaryKey bool // 自增类型 autoincr IsAutoIncrement bool // 是否可为空 null | not-null Nullable bool // 是否索引 index | index(索引名称) IsIndex bool // IndexNames []string // 是否唯一索引 unique | unique(索引名称) IsUnique bool // UniqueNames []string // 默认值 default(值) Default string // IsJSON 是否 json IsJSON bool Length int Length2 int Indexes map[string]int TimeZone *time.Location // contains filtered or unexported fields }
type Index ¶
Index represents a database index
type Table ¶
type Table struct { // dialect dialects.Dialect // Model interface{} Type reflect.Type Name string Columns []*Column ColumnNames []string Indexes map[string]*Index PrimaryKeys []string AutoIncrement string // contains filtered or unexported fields }
func NewEmptyTable ¶
func NewEmptyTable() *Table
func (*Table) GetPKColumns ¶
Click to show internal directories.
Click to hide internal directories.