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
DATE, TIME types cannot be retrieved as java.sql.Data, java.sql.Time correspondingly when inserted into appropriate DATE and TIME columns as strings ‘yyyy-mm-dd’ and ‘HH:MM:SS’.
The response contains strings whereas driver expects longs.
CREATE TABLE testdt(id INT PRIMARY KEY, d DATE) INSERT INTO testdt(id, d) VALUES (1, '1983-03-14')
Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT d FROM testdt"); rs.next(); rs.getDate(1) - fails
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number at org.tarantool.jdbc.SQLResultSet.getNumber(SQLResultSet.java:106) at org.tarantool.jdbc.SQLResultSet.getLong(SQLResultSet.java:112) at org.tarantool.jdbc.SQLResultSet.getDate(SQLResultSet.java:138) at TestJdbcDateTime.main(TestJdbcDateTime.java:29)
The text was updated successfully, but these errors were encountered:
DATE, TIME types cannot be retrieved as java.sql.Data, java.sql.Time correspondingly when inserted into appropriate DATE and TIME columns as strings ‘yyyy-mm-dd’ and ‘HH:MM:SS’.
The response contains strings whereas driver expects longs.
CREATE TABLE testdt(id INT PRIMARY KEY, d DATE)
INSERT INTO testdt(id, d) VALUES (1, '1983-03-14')
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT d FROM testdt");
rs.next();
rs.getDate(1) - fails
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number at org.tarantool.jdbc.SQLResultSet.getNumber(SQLResultSet.java:106) at org.tarantool.jdbc.SQLResultSet.getLong(SQLResultSet.java:112) at org.tarantool.jdbc.SQLResultSet.getDate(SQLResultSet.java:138) at TestJdbcDateTime.main(TestJdbcDateTime.java:29)
The text was updated successfully, but these errors were encountered: