microsoft/mssql-jdbc

[QUESTION] Is the driver fully compatible with non-typed null ?

viniciusxyz opened this issue · 2 comments

Question

I'm working with Spring boot and mssql, but there is a performance problem in spring's jdbctemplate where it searches to discover the type of the field when null is entered as a parameter and this greatly worsens the application's performance and I want to disable this behavior , but I need to know if the mssql driver always expects a type to be informed when passing a null value, or if reporting a null without a type is something fully supported, I know that the problem is not from this repository, but I couldn't find any document that says whether or not the driver supports untyped null arguments.

Link to the jdbctemplate issue if the issue was not well explained: spring-projects/spring-framework#25679 (Although the issue talks about postgresql the same problem occurs in mssql).

hi @viniciusxyz

I am unsure about the issue you are having I took a quick look at the issue linked as you mentioned this is about another driver but the API referenced there do work properly in the Microsoft JDBC Driver for SQL Server. As a matter of you if you look through the tests in the repo there are numerous cases setObject(paramIndex, null) is called.

If you have a specific case you are having problems with the driver please provide a standalone java repro that uses the Microsoft JDBC Driver for SQL Server directly (ie without Spring) along with the schema used for the repro so we can investigate.

Thanks

@lilgreenbird I would really just like to know if non-typed null is supported, the problem itself is in spring, but as you told me that you have unit tests on this, I believe I can consider that the driver is compatible, which already answers my question Thank you very much for your help.