You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Date object
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.
Hi there. Thanks for raising this issue. I think returning them as is may be the best solution. This will be considered a breaking change though so it will be part of the next major release.
I'll see what I can do about the custom transformer, other people have raised the same suggestion so it can probably be part of the same release.
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()
anddatetime()
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
andneo4jDriver.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
orneo4jDriver.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:
Date
objectIn fact, I am thinking that it would also be great to be able to inject a custom
Transformer
into theConnection
. 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
The text was updated successfully, but these errors were encountered: