Skip to content

chore: add CompileJsonValues to normalize values for JSON queries#50

Merged
almas-x merged 2 commits intomasterfrom
almas/chore
Jun 14, 2025
Merged

chore: add CompileJsonValues to normalize values for JSON queries#50
almas-x merged 2 commits intomasterfrom
almas/chore

Conversation

@almas-x
Copy link
Contributor

@almas-x almas-x commented Jun 14, 2025

📑 Description

In JSON queries, certain database drivers (e.g., PostgreSQL) require numeric and boolean values to be passed as strings when used in JSON comparisons. Passing raw integers, floats, or booleans directly can result in encoding or type mismatch errors such as unable to encode into text format for text (OID 25). This change introduces a normalization step to convert numeric and boolean values (including their pointer and slice variants) into string format for consistent behavior across different drivers.

✅ Checks

  • Added test cases for my code

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@almas-x almas-x merged commit c93c5c0 into master Jun 14, 2025
5 checks passed
@almas-x almas-x deleted the almas/chore branch June 14, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants