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: Use proper JSON contains function for PostgreSQL #1448

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

adamantike
Copy link
Collaborator

Fix json_array_contains_value function to use the @> operator for checking if a JSON array contains a value in PostgreSQL. This is necessary because the has_key function only works for string values.

Also, remove get_rom_collections method, as it was doing the same thing as get_collections_by_rom_id.

Fixes #1441.

Fix `json_array_contains_value` function to use the `@>` operator for
checking if a JSON array contains a value in PostgreSQL. This is
necessary because the `has_key` function only works for string values.

Also, remove `get_rom_collections` method, as it was doing the same
thing as `get_collections_by_rom_id`.

Fixes #1441.
@adamantike adamantike requested review from gantoine and zurdi15 January 9, 2025 00:07
Copy link

github-actions bot commented Jan 9, 2025

Test Results

91 tests  ±0   91 ✅ ±0   26s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7825bce. ± Comparison against base commit fb02db6.

@adamantike adamantike merged commit b77a60e into master Jan 9, 2025
8 checks passed
@adamantike adamantike deleted the fix/postgresql-json-contains branch January 9, 2025 01:18
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.

2 participants