I don’t think there’s a way to preserve microseconds and nanoseconds. That 
would require more than 64 bits of numeric precision.

Can you log a jira case for the feature that you think would fix this? I think 
first we need a way to internally represent TIMESTAMP(n) for n > 3. Then we 
also need support for LocalDateTime in JDBC (PreparedStatement.setObject, 
ResultSet.getObject, etc.)

> On Sep 1, 2022, at 7:19 AM, Dmitry Sysolyatin <dm.sysolya...@gmail.com> wrote:
> 
> Hi!
> I have an issue with dynamic parameters. I tried to pass
> "java.time.LocalDateTime" value for TIMESTAMP dynamic parameter using
> DataContext and got an exception:
> 
> "class java.time.LocalDateTime cannot be cast to class java.lang.Long."
> 
> I converted java.time.LocalDateTime to Long, but unfortunately, by using
> Long, microseconds and nanoseconds were lost.
> 
> Is there a way to preserve microseconds and nanoseconds ?

Reply via email to