I'm getting started on the official driver, "neo4j" and I'm having trouble reading the results after a query.
I have this:
with self.driver.session() as session: greeting = session.write_transaction(self._create_and_return_thing, title) print(greeting) @staticmethod def _create_and_return_thing(tx, data): result = tx.run("CREATE (t:Thing) " "SET t.name = $title " "SET t.image = $image " "SET t.description = $overview " "SET t.release_date = $release_date " "SET t.title = $title " "SET t.id = randomUUID() " "RETURN t", data),
And the data is successfully added to the database, but I can't figure out how to read "t" that returns from this.
I've tried a million combinations of the below:
record = result.single() print(data.name, record["id"]) for r in result: print("record: ", r['t.id']) print("record: ", result[r]['t.id']) return list(result)
None of these work^ and those are just what's left, have tried a million things and I can't figure out how to see the data, basically I want to get my hands on the "ID" returned from that create method.