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
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
I am trying to execute a select statement and the result is successful if there is no timestamp object in the result.
But if there's a timestamp in the result it cannot be added into the JSON object my the module and exception arises. Any suggestions how to use timestamp object in select statement ?
The text was updated successfully, but these errors were encountered:
I saw you casted timestamp to string in select itself like this :
SELECT id, TO_CHAR( time, 'YYYY-MM-DD HH24:MI:SS' ) AS TIME FROM test ORDER BY ID ASC"
But what if I want to use select * ??
When I use select * the following error arises. So basically when the module tries to cast the result from driver it cannot add timestamp to Json object
Caught error with SELECT: Cannot have objects of class class java.sql.Timestamp in JSON
org.vertx.java.core.VertxException: Cannot have objects of class class java.sql.Timestamp in JSON
at org.vertx.java.core.json.JsonElement.convertMap(JsonElement.java:60)
at org.vertx.java.core.json.JsonObject.(JsonObject.java:56)
at org.vertx.java.core.json.JsonObject.(JsonObject.java:45)
at com.bloidonia.vertx.mods.JsonUtils.listOfMapsToJsonArray(JsonUtils.java:61)
at com.bloidonia.vertx.mods.JdbcProcessor$4.process(JdbcProcessor.java:278)
at com.bloidonia.vertx.mods.JdbcProcessor$BatchHandler.handle(JdbcProcessor.java:595)
at com.bloidonia.vertx.mods.JdbcProcessor.doSelect(JdbcProcessor.java:263)
at com.bloidonia.vertx.mods.JdbcProcessor.doSelect(JdbcProcessor.java:252)
at com.bloidonia.vertx.mods.JdbcProcessor.handle(JdbcProcessor.java:204)
at com.bloidonia.vertx.mods.JdbcProcessor.handle(JdbcProcessor.java:47)
at org.vertx.java.core.eventbus.impl.DefaultEventBus$11.run(DefaultEventBus.java:951)
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to execute a select statement and the result is successful if there is no timestamp object in the result.
But if there's a timestamp in the result it cannot be added into the JSON object my the module and exception arises. Any suggestions how to use timestamp object in select statement ?
The text was updated successfully, but these errors were encountered: