when method
MssqlQuery
when(
- bool condition,
- MssqlQuery build(
- MssqlQuery query
- MssqlQuery otherwise(
- MssqlQuery query
Applies build only when condition holds.
Keeps conditional filters in the fluent chain. otherwise handles the
false branch.
Implementation
MssqlQuery when(
bool condition,
MssqlQuery Function(MssqlQuery query) build, {
MssqlQuery Function(MssqlQuery query)? otherwise,
}) {
if (condition) return build(this);
return otherwise == null ? this : otherwise(this);
}