Class: OData::AbstractQuery::Segments::CollectionSegment
- Inherits:
-
EntityTypeAndKeyValuesSegment
- Object
- OData::AbstractQuery::Segment
- EntityTypeSegment
- EntityTypeAndKeyValuesSegment
- OData::AbstractQuery::Segments::CollectionSegment
- Defined in:
- lib/o_data/abstract_query/segments/collection_segment.rb
Instance Attribute Summary
Attributes inherited from EntityTypeAndKeyValuesSegment
Attributes inherited from EntityTypeSegment
Attributes inherited from OData::AbstractQuery::Segment
Class Method Summary collapse
Methods inherited from EntityTypeAndKeyValuesSegment
#countable?, #execute!, extract_schema_object_name_and_key_values_and_keys, #initialize, key?, #key?, #key_property_value, key_property_value_for, remove_quotes, sanitize_key_values_and_keys_for!, #value
Methods inherited from EntityTypeSegment
#execute!, #initialize, #valid?
Methods included from Countable
Methods inherited from OData::AbstractQuery::Segment
#can_follow?, #execute!, #initialize, #inspect, segment_name, #valid?
Constructor Details
This class inherits a constructor from OData::AbstractQuery::Segments::EntityTypeAndKeyValuesSegment
Class Method Details
.can_follow?(anOtherSegment) ⇒ Boolean
18 19 20 |
# File 'lib/o_data/abstract_query/segments/collection_segment.rb', line 18 def self.can_follow?(anOtherSegment) anOtherSegment.blank? end |
.parse!(query, str) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/o_data/abstract_query/segments/collection_segment.rb', line 5 def self.parse!(query, str) return nil unless query.segments.empty? schema_object_name, key_values, keys = extract_schema_object_name_and_key_values_and_keys(str) return nil if schema_object_name.blank? entity_type = query.schema.find_entity_type(:name => schema_object_name.singularize) return nil if entity_type.blank? sanitized_key_values = sanitize_key_values_and_keys_for!(query, entity_type, key_values, keys) query.Segment(self, entity_type, sanitized_key_values) end |