Class: Arc::DataStores::ObjectDefinitions::Column
- Inherits:
-
Object
- Object
- Arc::DataStores::ObjectDefinitions::Column
- Defined in:
- lib/arc/data_stores/abstract/object_definitions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #allows_null? ⇒ Boolean
-
#initialize(store, properties = {}) ⇒ Column
constructor
A new instance of Column.
- #pk? ⇒ Boolean (also: #primary_key?)
- #type ⇒ Object
Constructor Details
#initialize(store, properties = {}) ⇒ Column
Returns a new instance of Column.
35 36 37 38 39 40 41 42 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 35 def initialize store, properties={} @data_store = store @name = properties.delete :name @allows_null = properties.delete :allows_null @default = properties.delete :default @is_pk = properties.delete(:pk) || properties.delete(:primary_key) @stype = properties.delete(:type) end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
34 35 36 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 34 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 33 def name @name end |
Instance Method Details
#allows_null? ⇒ Boolean
48 49 50 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 48 def allows_null? @allows_null end |
#pk? ⇒ Boolean Also known as: primary_key?
43 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 43 def pk?; @is_pk; end |
#type ⇒ Object
45 46 47 |
# File 'lib/arc/data_stores/abstract/object_definitions.rb', line 45 def type raise NotImplementedError end |