whereDate method
Adds a WHERE condition that filters field to match the given date.
Implementation
QueryBuilder whereDate(String field, DateTime date) {
final paramName = 'p${_paramIndex++}';
if (DB.driver == DBDriver.postgres) {
_wheres.add("DATE($field) = DATE(:$paramName)");
} else {
_wheres.add("DATE($field) = DATE(?)");
}
_bindings[paramName] = date.toIso8601String();
return this;
}