Class: ROM::SQL::ProjectionDSL Private
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Constructor Details
This class inherits a constructor from ROM::SQL::DSL
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/rom/sql/projection_dsl.rb', line 33 def method_missing(meth, *args, &block) if schema.key?(meth) schema[meth] else type = type(meth) if type ::ROM::SQL::Function.new(type) else super end end end |
Instance Method Details
#`(value) ⇒ Object
9 10 11 12 |
# File 'lib/rom/sql/projection_dsl.rb', line 9 def `(value) expr = ::Sequel::VIRTUAL_ROW.instance_eval { `#{value}` } ::ROM::SQL::Attribute.new(type(:string)).(sql_expr: expr) end |
#respond_to_missing?(name, include_private = false) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/rom/sql/projection_dsl.rb', line 15 def respond_to_missing?(name, include_private = false) super || type(name) end |