Class: Sequel::SQL::SQLArray
- Inherits:
-
Expression
- Object
- Expression
- Sequel::SQL::SQLArray
- Defined in:
- lib/sequel_core/sql.rb
Overview
Represents an SQL array. Added so it is possible to deal with a ruby array of all two pairs as an SQL array instead of an ordered hash-like conditions specifier.
Instance Method Summary collapse
-
#initialize(array) ⇒ SQLArray
constructor
Create an object with the given array.
-
#to_s(ds) ⇒ Object
Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.
Methods inherited from Expression
Constructor Details
#initialize(array) ⇒ SQLArray
Create an object with the given array.
770 771 772 |
# File 'lib/sequel_core/sql.rb', line 770 def initialize(array) @array = array end |
Instance Method Details
#to_s(ds) ⇒ Object
Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.
776 777 778 |
# File 'lib/sequel_core/sql.rb', line 776 def to_s(ds) ds.array_sql(@array) end |