Class: Google::Cloud::Firestore::Filter
- Inherits:
-
Object
- Object
- Google::Cloud::Firestore::Filter
- Defined in:
- lib/google/cloud/firestore/filter.rb
Overview
Represents the filter for structured query.
Instance Method Summary collapse
-
#and(filter_or_field = nil, operator = nil, value = nil) ⇒ Filter
Joins filter using AND operator.
-
#initialize(field, operator, value) ⇒ Google::Cloud::Firestore::Filter
constructor
Create a Filter object.
-
#or(filter_or_field = nil, operator = nil, value = nil) ⇒ Filter
Joins filter using OR operator.
Constructor Details
#initialize(field, operator, value) ⇒ Google::Cloud::Firestore::Filter
Create a Filter object.
76 77 78 |
# File 'lib/google/cloud/firestore/filter.rb', line 76 def initialize field, operator, value @filter = create_filter field, operator, value end |
Instance Method Details
#where(filter) ⇒ Filter #where(field, operator, value) ⇒ Filter
Joins filter using AND operator.
@param filter [::Google::Cloud::Firestore::Filter]
141 142 143 |
# File 'lib/google/cloud/firestore/filter.rb', line 141 def and filter_or_field = nil, operator = nil, value = nil combine_filters composite_filter_and, filter_or_field, operator, value end |
#where(filter) ⇒ Filter #where(field, operator, value) ⇒ Filter
Joins filter using OR operator.
@param filter [::Google::Cloud::Firestore::Filter]
206 207 208 |
# File 'lib/google/cloud/firestore/filter.rb', line 206 def or filter_or_field = nil, operator = nil, value = nil combine_filters composite_filter_or, filter_or_field, operator, value end |