Neo4J Cypher data type conversion

前端 未结 3 1474
醉酒成梦
醉酒成梦 2021-02-05 16:36

I\'ve got a property quantity on our Product-nodes and am looking to do a cypher query that gives me all nodes with quantity = 20 ... prob

3条回答
  •  攒了一身酷
    2021-02-05 16:48

    You can do it the other way round.

    MATCH (p:Product) WHERE p.quantity = str(20) RETURN p;
    

    should also work with params.

    MATCH (p:Product) WHERE p.quantity = str({quantity}) RETURN p;
    

    or even with inline property matches

    MATCH (p:Product {quantity : str({quantity})}) RETURN p;
    

提交回复
热议问题