Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
// The Table option allows overriding the default table
// name that is generated by ent. For example:
//
// entsql.Annotation{
// Table: "Users",
// }
//
Table string `json:"table,omitempty"`
// Charset defines the character-set of the table. For example:
//
// entsql.Annotation{
// Charset: "utf8mb4",
// }
//
Charset string `json:"charset,omitempty"`
// Collation defines the collation of the table (a set of rules for comparing
// characters in a character set). For example:
//
// entsql.Annotation{
// Collation: "utf8mb4_bin",
// }
//
Collation string `json:"collation,omitempty"`
// Options defines the additional table options. For example:
//
// entsql.Annotation{
// Options: "ENGINE = INNODB",
// }
//
Options string `json:"options,omitempty"`
// Size defines the column size in the generated schema. For example:
//
// entsql.Annotation{
// Size: 128,
// }
//
Size int64 `json:"size,omitempty"`
}
Annotation is a builtin schema annotation for attaching SQL metadata to schema objects for both codegen and runtime.
Click to show internal directories.
Click to hide internal directories.