Represents an SQL array access, with multiple possible arguments.
Set the array column and subscripts to the given arguments
[Source]
# File lib/sequel/sql.rb, line 1478 1478: def initialize(f, sub) 1479: @f, @sub = f, sub 1480: end
Create a new Subscript by accessing a subarray of a multidimensional array.
:a.sql_subscript(2) # a[2] :a.sql_subscript(2)[1] # a[2][1]
# File lib/sequel/sql.rb, line 1496 1496: def [](sub) 1497: Subscript.new(self, Array(sub)) 1498: end
Create a new Subscript appending the given subscript(s) the the current array of subscripts.
:a.sql_subscript(2) # a[2] :a.sql_subscript(2) | 1 # a[2, 1]
# File lib/sequel/sql.rb, line 1487 1487: def |(sub) 1488: Subscript.new(@f, @sub + Array(sub)) 1489: end
[Validate]