Skip to content

Conversation

@shiling
Copy link
Contributor

@shiling shiling commented Aug 26, 2024

JSql implementation has a bug whereby you cannot query boolean values. The cause of the bug is due to missing implementation for handling boolean values, causing all boolean values to be saved as "json" in the database. This means that entries for the boolean values are saved as : nVl=null, sVl=null, tVl=true/false.

I've updated the insert/upsert logic to save boolean values as nVl=1/0, sVl=true/false, tVl=true/false.

However, in order to support querying legacy entries that are already saved to the database as json, I've updated the building of preparedstatement for queries to query tVl=true/false for boolean values, since tVl is set for both legacy and new values. I've added comments above the relevant code block to explain why we don't use preparedStatement.setBoolean instead for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants