Class: Google::Cloud::Datastore::Filter
- Inherits:
-
Object
- Object
- Google::Cloud::Datastore::Filter
- Defined in:
- lib/google/cloud/datastore/filter.rb
Overview
Filter
Represents the filter criteria for a datastore query.
Instance Method Summary collapse
-
#and(name_or_filter, operator = nil, value = nil) ⇒ Object
Joins two filters with an AND operator.
-
#initialize(name, operator, value) ⇒ Filter
constructor
Creates a new Filter.
-
#or(name_or_filter, operator = nil, value = nil) ⇒ Object
Joins two filters with an OR operator.
Constructor Details
#initialize(name, operator, value) ⇒ Filter
Creates a new Filter.
81 82 83 |
# File 'lib/google/cloud/datastore/filter.rb', line 81 def initialize name, operator, value @grpc = create_property_filter name, operator, value end |
Instance Method Details
#and(name, operator, value) ⇒ Object #and(filter) ⇒ Object
Joins two filters with an AND operator.
116 117 118 |
# File 'lib/google/cloud/datastore/filter.rb', line 116 def and name_or_filter, operator = nil, value = nil combine_filters composite_filter_and, name_or_filter, operator, value end |
#or(name, operator, value) ⇒ Object #or(filter) ⇒ Object
Joins two filters with an OR operator.
162 163 164 |
# File 'lib/google/cloud/datastore/filter.rb', line 162 def or name_or_filter, operator = nil, value = nil combine_filters composite_filter_or, name_or_filter, operator, value end |