PyStellarDB 0.13.3__py2.py3-none-any.whl → 0.13.5__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyStellarDB-0.13.3.dist-info → PyStellarDB-0.13.5.dist-info}/METADATA +1 -1
- PyStellarDB-0.13.5.dist-info/RECORD +10 -0
- pystellardb/_version.py +3 -3
- pystellardb/graph_types.py +34 -2
- PyStellarDB-0.13.3.dist-info/RECORD +0 -10
- {PyStellarDB-0.13.3.dist-info → PyStellarDB-0.13.5.dist-info}/LICENSE +0 -0
- {PyStellarDB-0.13.3.dist-info → PyStellarDB-0.13.5.dist-info}/WHEEL +0 -0
- {PyStellarDB-0.13.3.dist-info → PyStellarDB-0.13.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
pystellardb/__init__.py,sha256=JOl41NviMN-qDV0Z8ZPmhNIxvgyauGGJHdB4A-8MhqM,93
|
2
|
+
pystellardb/_version.py,sha256=cwBvUjWVT20dAp04I_QQFlk81VsfhUWKUfT2FKtmxhk,498
|
3
|
+
pystellardb/graph_types.py,sha256=XbtPebhaRV7OimW-GxFJGSOcp-OnzWrlIe9M7Xv3sbU,14032
|
4
|
+
pystellardb/stellar_hive.py,sha256=xVnONjG03CLNwW3dymR2ZqXiEUvcMlIvPIOxzyoDFfE,15067
|
5
|
+
pystellardb/stellar_rdd.py,sha256=TYwsWYeCxfOliGq1kV3ArNXdye55cKWZF7s9M9nDdt4,1324
|
6
|
+
PyStellarDB-0.13.5.dist-info/LICENSE,sha256=1qDFxrywejs7xNBfOr6T-7lOuqDgSNIES77kTYege3w,560
|
7
|
+
PyStellarDB-0.13.5.dist-info/METADATA,sha256=Lg8U6us8NJ-hlFQEwaZDsfGZOgvPKnChM7lY6HtTt3s,9390
|
8
|
+
PyStellarDB-0.13.5.dist-info/WHEEL,sha256=_4XEmVmaBFWtekSGrbfOGNjC2I5lUr0lZSRblBllIFA,109
|
9
|
+
PyStellarDB-0.13.5.dist-info/top_level.txt,sha256=DRk-SeGVCdVAzv2CwFmdu75Yo7DgjUA3Hpu-9l8qPuU,12
|
10
|
+
PyStellarDB-0.13.5.dist-info/RECORD,,
|
pystellardb/_version.py
CHANGED
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-
|
11
|
+
"date": "2024-12-17T19:30:54+0800",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "0.13.
|
14
|
+
"full-revisionid": "edb05dd3d51f0a5af260e6cd442163058a81db20",
|
15
|
+
"version": "0.13.5"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
pystellardb/graph_types.py
CHANGED
@@ -8,6 +8,7 @@ from future.utils import with_metaclass
|
|
8
8
|
import json
|
9
9
|
import logging
|
10
10
|
import binascii
|
11
|
+
from typing import cast
|
11
12
|
|
12
13
|
_logger = logging.getLogger(__name__)
|
13
14
|
|
@@ -46,6 +47,21 @@ class GraphElement(with_metaclass(abc.ABCMeta, object)):
|
|
46
47
|
|
47
48
|
def getRowKeyHexString(self):
|
48
49
|
return self._rowKeyHexString
|
50
|
+
|
51
|
+
def __hash__(self):
|
52
|
+
if self._rowKeyHexString:
|
53
|
+
return hash(self._rowKeyHexString)
|
54
|
+
else:
|
55
|
+
return hash(self._fields)
|
56
|
+
|
57
|
+
def __eq__(self, value):
|
58
|
+
if isinstance(value, GraphElement):
|
59
|
+
if self._rowKeyHexString:
|
60
|
+
return self._rowKeyHexString == value._rowKeyHexString
|
61
|
+
else:
|
62
|
+
return self._fields == value._fields
|
63
|
+
else:
|
64
|
+
return False
|
49
65
|
|
50
66
|
|
51
67
|
class Vertex(GraphElement):
|
@@ -225,7 +241,7 @@ class Edge(GraphElement):
|
|
225
241
|
if 'startKey' not in m:
|
226
242
|
raise ValueError("Could not find start node entity key in JSON")
|
227
243
|
|
228
|
-
if schema.getVersion()
|
244
|
+
if schema.getVersion() >= 18:
|
229
245
|
startUid = prop_dict['__srcuid']
|
230
246
|
startLabelIdx = Vertex.parseLabelIdxFromRKV18(m['startKey'])
|
231
247
|
else:
|
@@ -246,7 +262,7 @@ class Edge(GraphElement):
|
|
246
262
|
if 'endKey' not in m:
|
247
263
|
raise ValueError("Could not find end node entity key in JSON")
|
248
264
|
|
249
|
-
if schema.getVersion()
|
265
|
+
if schema.getVersion() >= 18:
|
250
266
|
endUid = prop_dict['__dstuid']
|
251
267
|
endLabelIdx = Vertex.parseLabelIdxFromRKV18(m['endKey'])
|
252
268
|
else:
|
@@ -292,6 +308,22 @@ class Path(object):
|
|
292
308
|
|
293
309
|
def __str__(self):
|
294
310
|
return str([str(entry) for entry in self._elems])
|
311
|
+
|
312
|
+
def __hash__(self):
|
313
|
+
rks = []
|
314
|
+
for elem in self._elems:
|
315
|
+
rks.append(cast(GraphElement, elem).getRowKeyHexString())
|
316
|
+
|
317
|
+
return hash(tuple(rks))
|
318
|
+
|
319
|
+
def __eq__(self, value):
|
320
|
+
if isinstance(value, Path):
|
321
|
+
if self.length() == value.length():
|
322
|
+
return self.getElements() == value.getElements()
|
323
|
+
else:
|
324
|
+
return False
|
325
|
+
else:
|
326
|
+
return False
|
295
327
|
|
296
328
|
@staticmethod
|
297
329
|
def parsePathFromJson(schema, json_str):
|
@@ -1,10 +0,0 @@
|
|
1
|
-
pystellardb/__init__.py,sha256=JOl41NviMN-qDV0Z8ZPmhNIxvgyauGGJHdB4A-8MhqM,93
|
2
|
-
pystellardb/_version.py,sha256=2iFaCSwa5w1cA0YClojifvj3E-5S5CD6Q-k0gqktj-Y,498
|
3
|
-
pystellardb/graph_types.py,sha256=j9ZEvnTVRFOttg28rcYvOFzfoOBJcRxXxySKIzEcR-I,13098
|
4
|
-
pystellardb/stellar_hive.py,sha256=xVnONjG03CLNwW3dymR2ZqXiEUvcMlIvPIOxzyoDFfE,15067
|
5
|
-
pystellardb/stellar_rdd.py,sha256=TYwsWYeCxfOliGq1kV3ArNXdye55cKWZF7s9M9nDdt4,1324
|
6
|
-
PyStellarDB-0.13.3.dist-info/LICENSE,sha256=1qDFxrywejs7xNBfOr6T-7lOuqDgSNIES77kTYege3w,560
|
7
|
-
PyStellarDB-0.13.3.dist-info/METADATA,sha256=TOwRH-egbNXByXlJPL7-gp3SGhHUiJ8xQb7GVilrVv0,9390
|
8
|
-
PyStellarDB-0.13.3.dist-info/WHEEL,sha256=_4XEmVmaBFWtekSGrbfOGNjC2I5lUr0lZSRblBllIFA,109
|
9
|
-
PyStellarDB-0.13.3.dist-info/top_level.txt,sha256=DRk-SeGVCdVAzv2CwFmdu75Yo7DgjUA3Hpu-9l8qPuU,12
|
10
|
-
PyStellarDB-0.13.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|