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.



386
387
388
389
# File 'lib/lilit_sql.rb', line 386

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.



384
385
386
# File 'lib/lilit_sql.rb', line 384

def rows
  @rows
end

#table_nameObject

Returns the value of attribute table_name.



384
385
386
# File 'lib/lilit_sql.rb', line 384

def table_name
  @table_name
end

Instance Method Details

#subquery_nameObject



391
392
393
# File 'lib/lilit_sql.rb', line 391

def subquery_name
  @table_name.to_s
end