class Sequel::SQL::Subscript
Represents an SQL
array access, with multiple possible arguments.
Attributes
The SQL
array column
The array of subscripts to use (should be an array of numbers)
Public Class Methods
Source
# File lib/sequel/sql.rb 1811 def initialize(expression, sub) 1812 @expression = expression 1813 @sub = sub 1814 freeze 1815 end
Set the array column and subscripts to the given arguments
Public Instance Methods
Source
# File lib/sequel/sql.rb 1831 def [](sub) 1832 Subscript.new(self, Array(sub)) 1833 end
Create a new Subscript
by accessing a subarray of a multidimensional array.
Sequel[:a].sql_subscript(2) # a[2] Sequel[:a].sql_subscript(2)[1] # a[2][1]