Class: Linkage::MergeField
Overview
A special field used for merging two Data objects together. It has no dataset or schema.
Constant Summary
Constants inherited from Data
Instance Attribute Summary collapse
-
#database_type ⇒ Object
readonly
Returns the value of attribute database_type.
Attributes inherited from Field
Attributes inherited from Data
Instance Method Summary collapse
- #collation ⇒ Object
-
#initialize(name, ruby_type, database_type = nil) ⇒ MergeField
constructor
Create a new instance of MergeField.
Methods inherited from Field
#primary_key?, #ruby_type, #static?, #to_expr
Methods inherited from Data
#merge, #ruby_type, #static?, #to_expr
Constructor Details
#initialize(name, ruby_type, database_type = nil) ⇒ MergeField
Create a new instance of MergeField.
101 102 103 104 105 |
# File 'lib/linkage/field.rb', line 101 def initialize(name, ruby_type, database_type = nil) @name = name @ruby_type = ruby_type @database_type = database_type end |
Instance Attribute Details
#database_type ⇒ Object (readonly)
Returns the value of attribute database_type.
95 96 97 |
# File 'lib/linkage/field.rb', line 95 def database_type @database_type end |
Instance Method Details
#collation ⇒ Object
107 108 109 |
# File 'lib/linkage/field.rb', line 107 def collation @ruby_type.has_key?(:opts) ? @ruby_type[:opts][:collate] : nil end |