Update method
void
Update(
- T item
Update Function For Update Any Item To Table
Update Function will generate a Late Exception Because it's need to OpenBatch To called
batch.Update(Todo(id: 1, ...));
Implementation
void Update(T item) {
var updateId = ("${table.primaryKeyGet(item)}");
var updateIdText = ("'${table.primaryKeyGet(item)}'");
batch.update(table.tableName, query.toMap(item),
where:
"${table.primaryKeyName} = ${table.primrayKeyType == PrimaryKeyEnum.Text ? updateIdText : updateId}");
}