-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi,
I am experimenting with this package and it all looks promising. Thank you for the hard work!
I am running across a small issue though.
I am using neo4j date() and datetime() types in some properties.
When getting the result back from neo4j in a query, those properties come back as instances of neo4jDriver.v1.types.Date and neo4jDriver.v1.types.DateTime (see Temporal types).
However, when going through the transformer, they get transformed into standard objects here.
This means that I cannot use neo4jDriver.v1.isDate or neo4jDriver.v1.isDateTime anymore on them later on in my code for custom handling (in my case I use them to determine how to format them).
I would expect the transformer to either:
- transform them into a
Dateobject - return a formatted string (based on the type)
- return them as-is
In fact, I am thinking that it would also be great to be able to inject a custom Transformer into the Connection. That would allow custom transformations.
In the case of date objects, it might be useful for localization, for example.
I haven't tested yet, but similar issues will likely happen with Duration, Type, Localtime, Point, etc.
See also https://neo4j.com/docs/driver-manual/1.7/cypher-values/#driver-neo4j-type-system
What do you think?
Thanks you