fix(rust): ensure SteVec format always includes sv field#18
Merged
Conversation
Fix JSONB encryption to consistently return `SteVec` format with `sv` field present, even when no `SteVec` indexes are configured. Previously, JSONB columns without `SteVec` indexes would return `Ciphertext` format missing the expected `sv` field. This ensures API consistency where JSONB always uses `SteVec` format regardless of index configuration, preventing clients from needing to handle different response formats for the same data type.
Adds integration test to validate that JSONB columns without `SteVec` indexes return the correct `SteVec` format with null `sv` field. Renames tests from "fails" to "throws_exception" to match test naming conventions.
Add missing type assertion after `json_decode` in `test_encrypt_jsonb_returns_null_sv_on_non_ste_vec_column` test to resolve PHPStan mixed type offset access errors.
calvinbrewer
approved these changes
Jul 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix JSONB encryption to consistently return
SteVecformat withsvfield present, even when noSteVecindexes are configured. Previously, JSONB columns withoutSteVecindexes would returnCiphertextformat missing the expectedsvfield.This ensures API consistency where JSONB always uses
SteVecformat regardless of index configuration, preventing clients from needing to handle different response formats for the same data type.