toSQL method

  1. @override
String toSQL()
override

Generates SQL by combining all conditions with OR.

Each condition is wrapped in parentheses and joined with " OR ".

Returns the combined SQL string with OR logic.

Example:

// Returns: "( condition1 ) OR ( condition2 ) OR ( condition3 )"

Implementation

@override
String toSQL() {
  var sql = <String>[];
  for (int i = 0; i < _whereBodies.length; i++) {
    sql.add('( ${_whereBodies[i].toSQL()} )');
  }
  return sql.join(' OR ');
}