delete method

Future<DbResult> delete()

Implementation

Future<DbResult> delete() async {
  _ensureNotConsumed();
  if (_whereClauses.isEmpty) {
    throw StateError('delete() without where() would delete all rows. Use AppAmbitDb.execute() for intentional full-table deletes.');
  }
  final sql = 'DELETE FROM ${_quoteId(_table)} WHERE ${_joinConditions()}';
  final raw = await AppAmbitSdkFlutterPlatform.instance
      .dbExecute(sql, _whereParams.isEmpty ? null : List.of(_whereParams));
  return DbResult.fromMap(raw);
}