Class: Pakyow::Data::Sources::Relational::Associations::BelongsTo Private
- Inherits:
-
Pakyow::Data::Sources::Relational::Association
- Object
- Pakyow::Data::Sources::Relational::Association
- Pakyow::Data::Sources::Relational::Associations::BelongsTo
- Defined in:
- lib/pakyow/data/sources/relational/associations/belongs_to.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Pakyow::Data::Sources::Relational::Association
#associated_source, #associated_source_name, #name, #query, #source
Instance Method Summary collapse
- #associated_query_field ⇒ Object private
- #dependents? ⇒ Boolean private
- #foreign_key_field ⇒ Object private
- #foreign_key_type ⇒ Object private
- #query_field ⇒ Object private
- #result_type ⇒ Object private
- #specific_type ⇒ Object private
- #type ⇒ Object private
Methods inherited from Pakyow::Data::Sources::Relational::Association
#dependent_source_names, #initialize, #internal!, #internal?
Constructor Details
This class inherits a constructor from Pakyow::Data::Sources::Relational::Association
Instance Method Details
#associated_query_field ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 36 def associated_query_field @associated_source.primary_key_field end |
#dependents? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 40 def dependents? false end |
#foreign_key_field ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 24 def foreign_key_field :"#{@name}_#{@associated_source.primary_key_field}" end |
#foreign_key_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 28 def foreign_key_type @associated_source.primary_key_type end |
#query_field ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 32 def query_field foreign_key_field end |
#result_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 20 def result_type :one end |
#specific_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 16 def specific_type :belongs_to end |
#type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/pakyow/data/sources/relational/associations/belongs_to.rb', line 12 def type :belongs end |