Skip to content

fix(rust): ensure SteVec format always includes sv field#18

Merged
coreyhn merged 4 commits into
mainfrom
fix/jsonb-ste-vec-nullable-sv-field
Jul 22, 2025
Merged

fix(rust): ensure SteVec format always includes sv field#18
coreyhn merged 4 commits into
mainfrom
fix/jsonb-ste-vec-nullable-sv-field

Conversation

@coreyhn
Copy link
Copy Markdown
Collaborator

@coreyhn coreyhn commented Jul 21, 2025

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.

coreyhn and others added 4 commits July 21, 2025 17:12
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.
@coreyhn coreyhn requested a review from calvinbrewer July 22, 2025 00:02
@coreyhn coreyhn merged commit 35daf43 into main Jul 22, 2025
@coreyhn coreyhn deleted the fix/jsonb-ste-vec-nullable-sv-field branch July 22, 2025 00:52
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