AddTable registers the given interface type with gorp. The table name will be given the name of the TypeOf(i). You must call this function, or AddTableWithName, for any struct type you wish to persist with the given DbMap. This operation is idempotent. If i's type is already mapped, the existing *
(i interface{})
| 210 | // This operation is idempotent. If i's type is already mapped, the |
| 211 | // existing *TableMap is returned |
| 212 | func (m *DbMap) AddTable(i interface{}) *TableMap { |
| 213 | return m.AddTableWithName(i, "") |
| 214 | } |
| 215 | |
| 216 | // AddTableWithName has the same behavior as AddTable, but sets |
| 217 | // table.TableName to name. |