Class: CrossJoinUnnest

Inherits:
Object
  • Object
show all
Defined in:
lib/lilit_sql.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, row, ordinality) ⇒ CrossJoinUnnest

Returns a new instance of CrossJoinUnnest.



173
174
175
176
177
# File 'lib/lilit_sql.rb', line 173

def initialize(from, row, ordinality)
  @from = from
  @row = row
  @ordinality = ordinality
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



171
172
173
# File 'lib/lilit_sql.rb', line 171

def from
  @from
end

#ordinalityObject

Returns the value of attribute ordinality.



171
172
173
# File 'lib/lilit_sql.rb', line 171

def ordinality
  @ordinality
end

#rowObject

Returns the value of attribute row.



171
172
173
# File 'lib/lilit_sql.rb', line 171

def row
  @row
end

Instance Method Details

#alias_nameObject



183
184
185
# File 'lib/lilit_sql.rb', line 183

def alias_name
  @from.source.table_name
end

#rowsObject



179
180
181
# File 'lib/lilit_sql.rb', line 179

def rows
  [@row].map {|r| r.with_from(@from)}
end