aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r--lib/arel/nodes/binary.rb2
-rw-r--r--lib/arel/nodes/matches.rb14
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/arel/nodes/binary.rb b/lib/arel/nodes/binary.rb
index 939684957f..e35d2fd2e7 100644
--- a/lib/arel/nodes/binary.rb
+++ b/lib/arel/nodes/binary.rb
@@ -31,13 +31,11 @@ module Arel
As
Assignment
Between
- DoesNotMatch
GreaterThan
GreaterThanOrEqual
Join
LessThan
LessThanOrEqual
- Matches
NotEqual
NotIn
NotRegexp
diff --git a/lib/arel/nodes/matches.rb b/lib/arel/nodes/matches.rb
new file mode 100644
index 0000000000..583fb97c9b
--- /dev/null
+++ b/lib/arel/nodes/matches.rb
@@ -0,0 +1,14 @@
+module Arel
+ module Nodes
+ class Matches < Binary
+ attr_reader :escape
+
+ def initialize(left, right, escape = nil)
+ super(left, right)
+ @escape = escape && Nodes.build_quoted(escape)
+ end
+ end
+
+ class DoesNotMatch < Matches; end
+ end
+end