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