Documentation
¶
Index ¶
Constants ¶
View Source
const ( TagField = "dbx" MarkPK = "primaryKey" MarkIgnore = "_" MarkTenantKey = "tenantKey" MarkIsDeleted = "softDelete" )
Variables ¶
This section is empty.
Functions ¶
func GetTableName ¶
func GetTypeName ¶
Types ¶
type Column ¶
type Column struct {
Name string
ColumnName string
Type reflect.Type
IsPrimaryKey bool
IsTenantKey bool
IsLogicDeleteKey bool
Ignore bool
}
func ListColumns ¶
func ListValueColumns ¶
func NewColumnDefWith ¶
func NewColumnDefWith(f reflect.StructField) *Column
func (*Column) Format ¶
func (c *Column) Format(buffer *expr.TracedBuffer)
type Entity ¶
type Entity struct {
Columns []*Column
TableName string
Name string
Type reflect.Type
PrimaryKey *Column
TenantKey *Column
LogicDeleteKey *Column
}
func (*Entity) ColumnExprs ¶
func (*Entity) ColumnName ¶
ColumnName return column name by field name
func (*Entity) Format ¶
func (m *Entity) Format(buffer *expr.TracedBuffer)
Click to show internal directories.
Click to hide internal directories.