We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4905402 commit 4a14a0cCopy full SHA for 4a14a0c
firebase/firestore/_utils.py
@@ -6,6 +6,8 @@
6
7
8
from base64 import b64decode
9
+from google.cloud.firestore_v1._helpers import GeoPoint
10
+from google.api_core.datetime_helpers import DatetimeWithNanoseconds
11
12
13
def _from_datastore(data):
@@ -80,5 +82,11 @@ def _decode_datastore(value):
80
82
elif value.get('mapValue'):
81
83
return _from_datastore(value['mapValue'])
84
85
+ elif value.get('timestampValue'):
86
+ return DatetimeWithNanoseconds.from_rfc3339(value['timestampValue'])
87
+
88
+ elif value.get('geoPointValue'):
89
+ return GeoPoint(float(value['timestampValue']['latitude']), float(value['timestampValue']['longitude']))
90
91
else:
92
raise TypeError("Cannot convert to a Python Value", value, "Invalid type", type(value))
0 commit comments