| Class | OrWhereBuilder |
| In: |
lib/or_where_builder.rb
|
| Parent: | WhereBuilder |
Returns a string by collecting all the conditions and joins them with ’ and ’.
OrWhereBuilder.new [] do
equal :column1, 10
equal :column2, 'book'
end.to_sql #=> " or (column1 = 10 and column2 = 'book')"
# File lib/or_where_builder.rb, line 11
11: def to_sql
12: " or (#{sql_parts.join(' and ')})"
13: end