Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def enter_products():
- if request.method == 'POST':
- data = request.get_json(True)
- params = {"data": {"name":data['name']}}
- products=graph.cypher.execute(" create(a:Products {data}) RETURN (a)", params)
- CR_brand= {"data": {"brand":data['brand']}}
- brands=graph.cypher.execute("merge(b:Brand {brand:{data}.brand})
- RETURN (b)",CR_brand)
- relation_brand=graph.cypher.execute("create(a:name)-[c:product_of]->(b:brand)")
- RETURN 'OK'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement