Documentation ¶
Overview ¶
Package schema implements db schema utility functions.
Notice ¶
Table and column names in lowercase only support ¶
Usage
USER = schema.TABLE("user") USER_ID = USER.KEY("id") USER_VERSION = USER.VERSION("version") USER_DELETION = USER.DELETION("deletion") USER_NAME = USER.COLUMN("name")
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ParseDict func(genre, mkey string) string
ParseDict get dictionary values by genre and mkey.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column interface { Table() Table Name() string Comment() string Dict() string SetDict(value string) IsPrimary() bool IsVersion() bool IsDeletion() bool IsCreater() bool IsCreated() bool IsModifier() bool IsModified() bool IsTransient() bool String() string }
Column schema.Column.
type Table ¶
type Table interface { Name() string Comment() string Column(columnName string) Column Columns() []Column Primary() Column Version() Column Deletion() Column Creater() Column Created() Column Modifier() Column Modified() Column String() string COLUMN(columnName, comment string) Column PRIMARY(columnName, comment string) Column VERSION(columnName, comment string) Column DELETION(columnName, comment string) Column CREATER(columnName, comment string) Column CREATED(columnName, comment string) Column MODIFIER(columnName, comment string) Column MODIFIED(columnName, comment string) Column TRANSIENT(columnName, comment string) Column }
Table schema.Table.
Click to show internal directories.
Click to hide internal directories.