Module: Sequel::SQL::SubscriptMethods
- Included in:
- ComplexExpression, GenericComplexExpression, GenericExpression, Symbol
- Defined in:
- lib/sequel/sql.rb
Overview
This module includes the sql_subscript
method, representing SQL array accesses.
Instance Method Summary collapse
-
#sql_subscript(*sub) ⇒ Object
Return a
Subscript
with the given arguments, representing an SQL array access.
Instance Method Details
#sql_subscript(*sub) ⇒ Object
Return a Subscript
with the given arguments, representing an SQL array access.
:array.sql_subscript(1) # array[1]
:array.sql_subscript(1, 2) # array[1, 2]
:array.sql_subscript([1, 2]) # array[1, 2]
498 499 500 |
# File 'lib/sequel/sql.rb', line 498 def sql_subscript(*sub) Subscript.new(self, sub.flatten) end |