Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions redisgraph/query_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
class ResultSetColumnTypes(object):
COLUMN_UNKNOWN = 0
COLUMN_SCALAR = 1
COLUMN_NODE = 2
COLUMN_RELATION = 3
COLUMN_NODE = 2 # Unused as of RedisGraph v2.1.0, retained for backwards compatibility.
COLUMN_RELATION = 3 # Unused as of RedisGraph v2.1.0, retained for backwards compatibility.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using 2.1.0 as a placeholder because I think it is a sensible choice, but can rewrite these as 2.0.11 if preferred.



class ResultSetScalarTypes(object):
Expand Down Expand Up @@ -104,10 +104,6 @@ def parse_entity_properties(self, props):
return properties

def parse_node(self, cell):
# Return None if we received a null value.
if self.is_null_scalar(cell):
return None

# Node ID (integer),
# [label string offset (integer)],
# [[name, value type, value] X N]
Expand All @@ -120,10 +116,6 @@ def parse_node(self, cell):
return Node(node_id=node_id, label=label, properties=properties)

def parse_edge(self, cell):
# Return None if we received a null value.
if self.is_null_scalar(cell):
return None

# Edge ID (integer),
# reltype string offset (integer),
# src node ID offset (integer),
Expand Down Expand Up @@ -227,9 +219,6 @@ def pretty_print(self):
def is_empty(self):
return len(self.result_set) == 0

def is_null_scalar(self, cell):
return cell == [ResultSetScalarTypes.VALUE_NULL, None]

@staticmethod
def _get_value(prop, statistics):
for stat in statistics:
Expand Down