Class: Ramen::Metadata::Column
- Inherits:
-
RowDataGateway
- Object
- RowDataGateway
- Ramen::Metadata::Column
- Defined in:
- lib/ramen/metadata/column.rb
Overview
Column contains meta-data about columns within a Table. The attributes are database engine specific. Only column_name and column_id are required by Ramen. See RowDataGateway for more information.
See Database for a description of how Column fits in the Ramen collection hierarchy.
Links: readme.txt; source
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Comparison, returns -1,0,+1, compares column_name.
-
#add_to(database) ⇒ Object
add_to( database ).
Methods inherited from RowDataGateway
add_attributes, compare, #initialize
Constructor Details
This class inherits a constructor from Ramen::RowDataGateway
Instance Method Details
#<=>(other) ⇒ Object
Comparison, returns -1,0,+1, compares column_name
22 23 24 |
# File 'lib/ramen/metadata/column.rb', line 22 def <=> other Ramen::RowDataGateway.compare( column_name, other ) end |
#add_to(database) ⇒ Object
add_to( database )
Add self to the given database. (Choosing Message; Double Dispatch pattern) (Kent Beck. Smalltalk Best Practices Patterns. Perntice Hall PTR, Upper Saddle River, NJ 1997)
34 35 36 |
# File 'lib/ramen/metadata/column.rb', line 34 def add_to( database ) database.schema[ self.table_schema ].table[ self.table_name ].add_column( self ) end |