diff options
Diffstat (limited to 'lib/arel/algebra')
-rw-r--r-- | lib/arel/algebra/attributes/attribute.rb | 4 | ||||
-rw-r--r-- | lib/arel/algebra/value.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/algebra/attributes/attribute.rb b/lib/arel/algebra/attributes/attribute.rb index 8a7993f284..0ad9382a52 100644 --- a/lib/arel/algebra/attributes/attribute.rb +++ b/lib/arel/algebra/attributes/attribute.rb @@ -27,6 +27,10 @@ module Arel false end + def eval(row) + row[self] + end + module Transformations def self.included(klass) klass.send :alias_method, :eql?, :== diff --git a/lib/arel/algebra/value.rb b/lib/arel/algebra/value.rb index 90787fa5ea..70e94e0ad0 100644 --- a/lib/arel/algebra/value.rb +++ b/lib/arel/algebra/value.rb @@ -14,6 +14,10 @@ module Arel relation == other.relation end + def eval(row) + value + end + def bind(relation) Value.new(value, relation) end |