Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_records(self, raw_result_set):
records = []
result_set = raw_result_set[1]
for row in result_set:
record = []
for idx, cell in enumerate(row):
if self.header[idx][0] == ResultSetColumnTypes.COLUMN_SCALAR:
record.append(self.parse_scalar(cell))
elif self.header[idx][0] == ResultSetColumnTypes.COLUMN_NODE:
record.append(self.parse_node(cell))
elif self.header[idx][0] == ResultSetColumnTypes.COLUMN_RELATION:
record.append(self.parse_edge(cell))
else:
print("Unknown column type.\n")
records.append(record)
return records