CustomPrimaryKey sets a custom primary key definition (optional).
(primaryKeyCode string)
| 114 | |
| 115 | // CustomPrimaryKey sets a custom primary key definition (optional). |
| 116 | func (t *Table) CustomPrimaryKey(primaryKeyCode string) *Table { |
| 117 | t.AddColumn(primaryKeyCode) |
| 118 | t.customPrimaryKey = true |
| 119 | return t |
| 120 | } |
| 121 | |
| 122 | // Create generates and executes a CREATE TABLE statement. Requires prior SetTableName() and AddColumn(). |
| 123 | func (t *Table) Create() (r result.VoidResult) { |