Method: Sequel::SQL::Builders#subscript
- Defined in:
- lib/sequel/sql.rb
#subscript(exp, *subs) ⇒ Object
Return an SQL::Subscript with the given arguments, representing an SQL array access.
Sequel.subscript(:array, 1) # array[1]
Sequel.subscript(:array, 1, 2) # array[1, 2]
Sequel.subscript(:array, [1, 2]) # array[1, 2]
Sequel.subscript(:array, 1..2) # array[1:2]
Sequel.subscript(:array, 1...3) # array[1:2]
657 658 659 |
# File 'lib/sequel/sql.rb', line 657 def subscript(exp, *subs) SQL::Subscript.new(exp, subs.flatten) end |