Class: Table

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(struct, table_name) ⇒ Table

Returns a new instance of Table.



286
287
288
289
# File 'lib/lilit_sql.rb', line 286

def initialize(struct, table_name)
  @table_name = table_name
  @rows = [Row.new(struct.members)]
end

Instance Attribute Details

#rowsObject

Returns the value of attribute rows.



284
285
286
# File 'lib/lilit_sql.rb', line 284

def rows
  @rows
end

#table_nameObject

Returns the value of attribute table_name.



283
284
285
# File 'lib/lilit_sql.rb', line 283

def table_name
  @table_name
end

Instance Method Details

#subquery_nameObject



291
292
293
# File 'lib/lilit_sql.rb', line 291

def subquery_name
  @table_name.to_s
end