We need to store logical expression in a property & execute it in run time.
if ( a> 5 & b >6)
{
return 'open'
}
What would be the best way to do in neo4j.
Does the returned value need to be part of what's stored, or can that be independent of it? You may be able to use apoc.cypher.run() from APOC Procedures to help, though either the entire expression would need to be valid CYPHER (a RETURN CASE WHEN ... type of query), or if you are only storing the a> 5 & b >6, then you'll need to supply the Cypher that will use that in a similar query.
Be aware that this type of dynamic query string generation does risk Cypher injection, so make sure you've vetted and cleaned the properties such that it can't escape intended usage and execute arbitrary Cypher.