Home > Software engineering >  Pass list as argument in neo4j using Python
Pass list as argument in neo4j using Python

Time:02-10

I am trying to run this query in which the parameter is a list:

codes = ["123","234"]
query = graph.run("""
     MATCH (n:NAME)
     where n.codes = "{}"
     RETURN return n.commonName as commonName""".format(codes))

I am trying to pass the "codes" as parameter to Neo4j query. This throws an error that "list is not readable in the query"

Any suggestions would be appreciated.

CodePudding user response:

  •  Tags:  
  • Related