Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON function compatibility for SQLite and PostgreSQL #2746

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

bcmmbaga
Copy link
Contributor

Describe your changes

This PR resolves the issue with json_array_length compatibility between SQLite and PostgreSQL. It adjusts the query to conditionally cast types:

  • PostgreSQL: Casts to json with ::json.
  • SQLite: Uses the text representation directly.

Issue ticket number and link

Closes #2745

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
@bcmmbaga bcmmbaga marked this pull request as ready for review October 16, 2024 14:31
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Copy link

@mlsmaycon mlsmaycon merged commit 96d2207 into main Oct 16, 2024
21 checks passed
@mlsmaycon mlsmaycon deleted the fix/get-group-by-name-postgres branch October 16, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't add peers to groups when upgrade to 0.30.1
2 participants