buildDeleteSql static method
Generates a structured DELETE statement based on an ID.
Implementation
static SqlStatement buildDeleteSql(
String tableName,
dynamic idValue, {
String idColumnName = 'id',
}) {
if (idValue == null) {
throw ArgumentError('Cannot build DELETE: ID value cannot be null.');
}
return SqlStatement(
operationType: SqlOperationType.delete,
tableName: tableName,
whereClauses: ['$idColumnName = ?'],
whereArguments: [idValue],
);
}