Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColumnDef ¶
type ColumnDef struct {
Type typx.Type
Tag reflect.StructTag
DataType string
Width uint64
Precision uint64
Default *string
OnUpdate *string
Null bool
AutoInc bool
Comment string
Desc []string
Relation []string
Deprecated *DeprecatedActions
}
ColumnDef describes source and database model
func (*ColumnDef) ParseDBTag ¶
type DeprecatedActions ¶
type DeprecatedActions struct {
RenameTo string `name:"rename"`
}
type KeyColumnOption ¶
func KeyColumnOptionByNames ¶
func KeyColumnOptionByNames(names ...string) []KeyColumnOption
func ResolveKeyColumnOptions ¶
func ResolveKeyColumnOptions(s string) (options []KeyColumnOption)
func ResolveKeyColumnOptionsFromStrings ¶
func ResolveKeyColumnOptionsFromStrings(ss ...string) (options []KeyColumnOption)
func (*KeyColumnOption) String ¶
func (o *KeyColumnOption) String() string
type KeyDefine ¶
type KeyDefine struct {
Kind KeyKind
Name string
Using string
Comment string
Options []KeyColumnOption
}
func ParseKeyDef ¶
ParseKeyDef parses key define eg:
| Kind | Name[,Using] | Field[,Option] | | :--- | :--- | :---- | | idx | idx_name,BTREE | Name | | index | idx_name,GIST | Geo,gist_trgm_ops | | unique_index | idx_name | f_org_id,NULLS,FIRST;MemberID | | u_idx | idx_name | OrgID;f_member_id,NULLS,FIRST | | primary | | ID | | pk | | ID |
func (*KeyDefine) OptionsNames ¶
func (*KeyDefine) OptionsStrings ¶
Click to show internal directories.
Click to hide internal directories.