Documentation
¶
Index ¶
- type DDL
- func (s *DDL) AddFK(table, target interface{}, fk string)
- func (s *DDL) AddFKs(table interface{})
- func (s *DDL) AddForeignKey(table, fkey, target, targetCol string, onDelete, onUpdate FKAction)
- func (s *DDL) AddTables(tables ...interface{})
- func (s *DDL) GetSchema(obj interface{}) *schema.Schema
- func (s *DDL) GetSchemaByStructName(structName string) *schema.Schema
- func (s *DDL) MakeFKName(table, fkey, target, targetCol string) string
- func (s *DDL) MakeFKs()
- func (s *DDL) MatchTableName(structType reflect.Type, tableName string) bool
- func (s *DDL) ParseFKInfo(tag string) FKInfo
- func (s *DDL) Range(f func(structType reflect.Type, tableSchema *schema.Schema) bool)
- type FKAction
- type FKInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DDL ¶
type DDL struct { DefaultOnDelete FKAction DefaultOnUpdate FKAction // contains filtered or unexported fields }
func (*DDL) AddForeignKey ¶
func (*DDL) GetSchemaByStructName ¶
func (*DDL) MakeFKName ¶
func (*DDL) MatchTableName ¶
func (*DDL) ParseFKInfo ¶
tag: eg. FK:User,CASCADE,CASCADE Table,on delete %s,on update %s
Click to show internal directories.
Click to hide internal directories.