google-cloud-firestore 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/firestore/query.rb +13 -12
- data/lib/google/cloud/firestore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e39fbfebed5714a9eeb9fe9e1e22e8bf0ac29e16b34c1683b0e35bd9bde3d754
|
4
|
+
data.tar.gz: d7a8363434c9e48dc134acbc863020e89d89bcc0af7c95148e4a9f0542a3554c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cd46477f0486ab53708fdae544736b1f7909de2cf707d63cef4c84b017bd360e4e14b4946a62b280614c29374bf063bbaee3f82171e04f7e916db6bc1ccbcec
|
7
|
+
data.tar.gz: 5d8b3303a2aa4f097ce1af9781d308a577f3fcb1054d356982ca9141b9b99cdecbdbc76315d4ed3f97a80825449a7ae06b90407a3a5cbecb282a20cbe38a42e7
|
data/CHANGELOG.md
CHANGED
@@ -216,6 +216,9 @@ module Google
|
|
216
216
|
# * greater than: `>`, `gt`
|
217
217
|
# * greater than or equal: `>=`, `gte`
|
218
218
|
# * equal: `=`, `==`, `eq`, `eql`, `is`
|
219
|
+
# * not equal: `!=`
|
220
|
+
# * in: `in`
|
221
|
+
# * not in: `not-in`, `not_in`
|
219
222
|
# * array contains: `array-contains`, `array_contains`
|
220
223
|
# @param [Object] value A value the field is compared to.
|
221
224
|
#
|
@@ -993,23 +996,20 @@ module Google
|
|
993
996
|
"eq" => :EQUAL,
|
994
997
|
"eql" => :EQUAL,
|
995
998
|
"is" => :EQUAL,
|
999
|
+
"!=" => :NOT_EQUAL,
|
996
1000
|
"array_contains" => :ARRAY_CONTAINS,
|
997
1001
|
"array-contains" => :ARRAY_CONTAINS,
|
998
1002
|
"include" => :ARRAY_CONTAINS,
|
999
1003
|
"include?" => :ARRAY_CONTAINS,
|
1000
1004
|
"has" => :ARRAY_CONTAINS,
|
1001
1005
|
"in" => :IN,
|
1006
|
+
"not_in" => :NOT_IN,
|
1007
|
+
"not-in" => :NOT_IN,
|
1002
1008
|
"array_contains_any" => :ARRAY_CONTAINS_ANY,
|
1003
1009
|
"array-contains-any" => :ARRAY_CONTAINS_ANY
|
1004
1010
|
}.freeze
|
1005
1011
|
##
|
1006
1012
|
# @private
|
1007
|
-
EQUALITY_FILTERS = %i[
|
1008
|
-
EQUAL
|
1009
|
-
ARRAY_CONTAINS
|
1010
|
-
].freeze
|
1011
|
-
##
|
1012
|
-
# @private
|
1013
1013
|
INEQUALITY_FILTERS = %i[
|
1014
1014
|
LESS_THAN
|
1015
1015
|
LESS_THAN_OR_EQUAL
|
@@ -1037,12 +1037,13 @@ module Google
|
|
1037
1037
|
raise ArgumentError, "unknown operator #{op}" if operator.nil?
|
1038
1038
|
|
1039
1039
|
if value_unary? value
|
1040
|
-
if operator
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1040
|
+
operator = if operator == :EQUAL
|
1041
|
+
value_nan?(value) ? :IS_NAN : :IS_NULL
|
1042
|
+
elsif operator == :NOT_EQUAL
|
1043
|
+
value_nan?(value) ? :IS_NOT_NAN : :IS_NOT_NULL
|
1044
|
+
else
|
1045
|
+
raise ArgumentError, "can only perform '==' and '!=' comparisons on #{value} values"
|
1046
|
+
end
|
1046
1047
|
|
1047
1048
|
return StructuredQuery::Filter.new(
|
1048
1049
|
unary_filter: StructuredQuery::UnaryFilter.new(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|