MCPcopy Create free account
hub / github.com/go-gorp/gorp / SetVersionCol

Method SetVersionCol

table.go:164–169  ·  view source on GitHub ↗

SetVersionCol sets the column to use as the Version field. By default the "Version" field is used. Returns the column found, or panics if the struct does not contain a field matching this name. Automatically calls ResetSql() to ensure SQL statements are regenerated.

(field string)

Source from the content-addressed store, hash-verified

162//
163// Automatically calls ResetSql() to ensure SQL statements are regenerated.
164func (t *TableMap) SetVersionCol(field string) *ColumnMap {
165 c := t.ColMap(field)
166 t.version = c
167 t.ResetSql()
168 return c
169}
170
171// SqlForCreateTable gets a sequence of SQL commands that will create
172// the specified table and any associated schema

Callers 2

TestOverrideVersionColFunction · 0.80
initDBMapFunction · 0.80

Calls 2

ColMapMethod · 0.95
ResetSqlMethod · 0.95

Tested by 2

TestOverrideVersionColFunction · 0.64
initDBMapFunction · 0.64