Module: Sequel::SQL::SubscriptMethods
- Included in:
- ComplexExpression, GenericComplexExpression, GenericExpression, Symbol
- Defined in:
- lib/sequel/sql.rb
Overview
Methods that create Subscripts (SQL array accesses).
Instance Method Summary collapse
-
#sql_subscript(*sub) ⇒ Object
Return an SQL array subscript with the given arguments.
Instance Method Details
#sql_subscript(*sub) ⇒ Object
Return an SQL array subscript with the given arguments.
:array.sql_subscript(1) # SQL: array[1]
:array.sql_subscript(1, 2) # SQL: array[1, 2]
412 413 414 |
# File 'lib/sequel/sql.rb', line 412 def sql_subscript(*sub) Subscript.new(self, sub.flatten) end |