View definition

(*TableMap).SetKeys

Defined in github.com/go-gorp/gorp/table.go

Description

SetKeys lets you specify the fields on a struct that map to primary key columns on the table. If isAutoIncr is set, result.LastInsertId() will be used after INSERT to bind the generated id to the Go struct.

Automatically calls ResetSql() to ensure SQL statements are regenerated.

Panics if isAutoIncr is true, and fieldNames length != 1

SetKeys is referenced in 16 repositories

github.com/go-gorp/gorp github.com/skarllot/flogviewer github.com/ymd38/revel-sample

...