asDeleteCommand method
Generates a DELETE command for the given table name.
The tableName
parameter specifies the name of the table to delete from.
The nullAsBlank
parameter determines whether null values should be treated as blank strings.
The quoteChar
parameter specifies the character used for quoting identifiers.
The dataBaseProvider
parameter specifies the database provider.
Returns the generated DELETE command as a string.
Implementation
String asDeleteCommand({
required String tableName,
bool nullAsBlank = false,
dynamic quoteChar,
String dataBaseProvider = "",
}) {
String whereClause = asWhereClausule(
nullAsBlank: nullAsBlank,
quoteChar: quoteChar,
dataBaseProvider: dataBaseProvider,
);
return 'DELETE FROM ${SqlUtil.wrap(tableName, quoteChar, dataBaseProvider)} WHERE $whereClause;';
}