We're giving our nodes a `usedAt` property whose type can vary:
- If the node has been "used", the property is a timestamp -- e.g. an int.
- If the node hasn't been "used", the property is false -- i.e. a boolean.
This presents a problem using Cypher today: we're unable to perform queries that compare that property.
It'd be nice if Neo4j supported flexible typing like this. E.g. in this case:
- ORDER BY could order types just as it orders values, e.g. nulls before booleans before ints before strings.
- WHERE could support a function for querying the property's type, e.g. TYPE(n.usedAt) = 'number', so that we could properly filter before comparing.
Thanks!
Aseem