code: func (m *DbMap) AddTableDynamic(inp DynamicTable, schema string) *TableMap {
  
  	val := reflect.ValueOf(inp)
  	elm := val.Elem()
  	t := elm.Type()
  	name := inp.TableName()
  	if name == "" {
  		panic("Missing table name in DynamicTable instance")
  	}
  
  	// Check if there is another dynamic table with the same name
  	if _, found := m.dynamicTableFind(name); found {
  		panic(fmt.Sprintf("A table with the same name %v already exists", name))
  	}
  
  	tmap := &TableMap{gotype: t, TableName: name, SchemaName: schema, dbmap: m}
  	var primaryKey []*ColumnMap
  	tmap.Columns, primaryKey = m.readStructColumns(t)
  	if len(primaryKey) > 0 {
  		tmap.keys = append(tmap.keys, primaryKey...)
  	}
  
  	m.dynamicTableAdd(name, tmap)
  
  	return tmap
  }
docs: // AddTableDynamic registers the given interface type with gorp.
  // The table name will be dynamically determined at runtime by
  // using the GetTableName method on DynamicTable interface