Class: Dynamicloud::API::Criteria::JoinClause
- Defined in:
- lib/dynamic_criteria.rb
Overview
This class represents a Join clause
Constant Summary
Constants inherited from Condition
Condition::ROOT, Condition::WITHOUT
Instance Method Summary collapse
-
#initialize(join_type, model_id, aliass, join_condition) ⇒ JoinClause
constructor
Builds a JoinClause using type, model and compatible condition.
-
#to_record_string(parent) ⇒ Object
This method will return a String of this condition.
Constructor Details
#initialize(join_type, model_id, aliass, join_condition) ⇒ JoinClause
Builds a JoinClause using type, model and compatible condition.
65 66 67 68 69 70 |
# File 'lib/dynamic_criteria.rb', line 65 def initialize(join_type, model_id, aliass, join_condition) @join_type = join_type @model_id = model_id @join_condition = join_condition @alias = aliass end |
Instance Method Details
#to_record_string(parent) ⇒ Object
This method will return a String of this condition
75 76 77 |
# File 'lib/dynamic_criteria.rb', line 75 def to_record_string(parent) '{ "type": "' + @join_type.to_string + '", "alias": "' + @alias + '", "target": "' + @model_id.to_s + '", "on": "' + @join_condition + '" }' end |