Hi, I am trying to get the user id after inserting the node, but I dont see the value in the result object. Being new, I am confident I am missing something obvious. PL note that the node is in the db and the result summary object shows the nodes created. can you please help?
def insert_gdbuser(self, email_address, password):
driver = NeoDB.get_session()
user_id = uuid.uuid4()
result = driver.write_transaction(
lambda tx: tx.run(
"CREATE (u:User {email_address:$email_address, password:$password, user_id:$user_id})"
" RETURN u.email_address, u.user_id",
{"email_address": str(email_address), "password": str(password), "user_id": str(user_id)}))
record = result.single()
info = result.consume().counters.nodes_created
if info > 0 and record is not None:
print("The user id is", record["u.user_id"])
Thanks for your help