feat(persistence): PostgreSQL composite params + :of-type modifier#119
Open
smunini wants to merge 1 commit into
Open
feat(persistence): PostgreSQL composite params + :of-type modifier#119smunini wants to merge 1 commit into
smunini wants to merge 1 commit into
Conversation
… modifier Brings the PostgreSQL search backend to near-parity with SQLite. - Composite parameters: `build_composite_condition` splits the `$`-separated value, builds a bare column predicate per component (token / string / number / quantity / date) against a single search_index row, and scopes it to the composite parameter name — mirroring the SQLite handler. - `:of-type` token modifier: matches an Identifier by `type-system|type-code| identifier-value`, using the value_identifier_type_system/code columns. Both are implemented at the backend SQL level. As with SQLite, the shared extractor does not populate composite_group / identifier-type columns and the REST layer does not yet wire composite component definitions, so these are reachable via the direct backend API; documented in the assessment. Matrix: PostgreSQL Composite and :of-type ○ → ✓. Updated the composite note, Phase 5b status, and search-spec-assessment.md accordingly. Tests: query_builder unit tests for composite token+quantity SQL, the no-components guard, and :of-type identifier SQL.
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.
Stacked on #118.
Context
Continues PostgreSQL→SQLite search parity. Before this PR, PostgreSQL returned no condition for composite parameters and ignored the
:of-typemodifier.Changes
build_composite_conditionsplits the$-separated value, builds a bare column predicate per component (token / string / number / quantity / date) against a singlesearch_indexrow, and scopes it to the composite parameter name. Mirrors the SQLite handler.:of-typetoken modifier — matches an Identifier bytype-system|type-code|identifier-valueusing thevalue_identifier_type_system/value_identifier_type_codecolumns.Reachability note
Both are implemented at the backend SQL level. As with SQLite, the shared extractor does not populate
composite_group/ identifier-type columns during indexing, and the REST layer builds outgoing params with emptycomponents. So these are reachable via the direct backend API (verified by unit tests), not yet end-to-end over HTTP. This is documented indocs/search-spec-assessment.md(composite caveat + roadmap item) and the matrix notes. Wiring composite components through REST is a follow-up that benefits all backends.Docs
Matrix: PostgreSQL Composite and :of-type ○ → ✓, with a clarifying composite note. Phase 5b status and assessment doc updated.
Tests
query_builderunit tests: composite token+quantity SQL (column refs + param count), the no-components guard returnsNone, and:of-typeidentifier SQL. Full PG integration search suite still green; clippy-D warningsclean.