rails/arel — pull request #166 by labocho (2013-03-01 14:26:04+00:00)
Title: Support ESCAPE clause

Added Arel::Nodes::Escape to escape special characters (% or _) in LIKE pattern.

```ruby
# Usage
table = Arel::Table.new(:drinks)
query = table.project relation[:id]

escaped_pattern = Arel::Nodes::Escape.new('%100!% fruit juice', '!')
query.where relation[:name].matches(escaped_pattern)
query.to_sql
# => SELECT "drinks"."id" FROM "drinks" WHERE "drinks"."name" LIKE '%100!% fruit juice' ESCAPE '!'
```