insertEntity<T> method
Insert a complete StanzaEntity into the database.
Implementation
void insertEntity<T>(T entity) {
if (table.$type != T) {
var msg =
'Mismatch. The entity is Type $T. The table is type ${table.$type}';
throw StanzaException(msg);
}
var map = table.toDb(entity);
map.forEach((k, v) {
_insert.insert(k, v, this);
});
}