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
Expected behavior
A SQLException should be thrown instead indicating that parameter type cannot be determined.
Logs
java.lang.NullPointerException
at org.sqlite.core.CoreStatement.checkIndex(CoreStatement.java:145)
at org.sqlite.jdbc3.JDBC3PreparedStatement.getParameterType(JDBC3PreparedStatement.java:165)
at xxx.dao.stubbing.SqliteBinderConfiguration.getBinder(SqliteBinderConfiguration.java:25)
at com.ninja_squad.dbsetup.operation.Insert.initializeBinders(Insert.java:286)
at com.ninja_squad.dbsetup.operation.Insert.execute(Insert.java:210)
at com.ninja_squad.dbsetup.operation.CompositeOperation.execute(CompositeOperation.java:92)
at com.ninja_squad.dbsetup.DbSetup.launch(DbSetup.java:107)
Environment (please complete the following information):
I'm not really sure of the desired behavior here. In this driver we only rely on which setX method has been called on PreparedStatement, not on metadata returned by the database. But I assume the ParameterMetaData documentation can be interpreted this way. I have not checked implementation in other drivers.
For example we can modify this test:
I'm not really sure of the desired behavior here. In this driver we only rely on which setX method has been called on PreparedStatement, not on metadata returned by the database. But I assume the ParameterMetaData documentation can be interpreted this way. I have not checked implementation in other drivers.
SQLite doesn't really have types, which makes things like this difficult.
I'm facing an issue since version
v3.41.2.2
.Describe the bug
NullPointerException for
org.sqlite.jdbc3.JDBC3PreparedStatement.getParameterType
when no parameter has been set yet.To Reproduce
Expected behavior
A SQLException should be thrown instead indicating that parameter type cannot be determined.
Logs
Environment (please complete the following information):
Additional context
The bug appears in my application tests using http://dbsetup.ninja-squad.com/ when a binder try to guess the database types (http://dbsetup.ninja-squad.com/user-guide.html#data-formats).
I'm not really sure of the desired behavior here. In this driver we only rely on which
setX
method has been called onPreparedStatement
, not on metadata returned by the database. But I assume theParameterMetaData
documentation can be interpreted this way. I have not checked implementation in other drivers.For example we can modify this test:
and it will pass even if the declared type in the database is not an integer.
The text was updated successfully, but these errors were encountered: