MCPcopy
hub / github.com/andeya/pholcus / CustomPrimaryKey

Method CustomPrimaryKey

common/mysql/mysql.go:116–120  ·  view source on GitHub ↗

CustomPrimaryKey sets a custom primary key definition (optional).

(primaryKeyCode string)

Source from the content-addressed store, hash-verified

114
115// CustomPrimaryKey sets a custom primary key definition (optional).
116func (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().
123func (t *Table) Create() (r result.VoidResult) {

Callers 5

flushMethod · 0.80
flushMethod · 0.80

Calls 1

AddColumnMethod · 0.95