feat(qvac-lib-registry-client): add findBy() method using schema's findBy#146
Closed
simon-iribarren wants to merge 5 commits into
Closed
feat(qvac-lib-registry-client): add findBy() method using schema's findBy#146simon-iribarren wants to merge 5 commits into
simon-iribarren wants to merge 5 commits into
Conversation
7bd3fc7 to
9f371d1
Compare
…ndBy Add findBy(params) method to QVACRegistryClient that delegates to the schema's RegistryDatabase.findBy() method for efficient indexed queries. Changes: - Add findBy() method to client that delegates to this.db.findBy() - Add FindByParams interface and findBy type definition - Mark existing findModels* methods as legacy in type definitions Depends on: qvac-registry-schema with findBy() support
9f371d1 to
eeeeac2
Compare
Update the schema dependency to use the newly released v0.2.1 which includes the findBy() method and compound index support. Add findBy to the client API surface and async function tests. Co-authored-by: Cursor <cursoragent@cursor.com>
opaninakuffo
approved these changes
Feb 9, 2026
NamelsKing
approved these changes
Feb 9, 2026
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.
Summary
Add
findBy(params)method toQVACRegistryClientthat delegates to the schema'sRegistryDatabase.findBy()for efficient indexed queries.Why
The registry client previously only exposed low-level index-specific methods (
findModelsByEngine,findModelsByName, etc.), requiring callers to choose the right index manually. The newfindBy()provides a single entry point that automatically selects the most efficient HyperDB index based on the provided params — including the new compoundengine + quantizationindex added in #145.The
addon/modelTypefilter is intentionally excluded from this method. It is a derived concept (engine → addon mapping) that exists only in the SDK layer, not in the database schema. The SDK server handler applies this mapping after receiving results from the client.Changes
client/lib/client.js: AddfindBy()method delegating tothis.db.findBy()client/index.d.ts: AddFindByParamsinterface andfindBytype definitionDependencies
This PR depends on #145 — the schema package must be published with
findBy()and the compound index before this can be merged.Merge order
findBy()) → publish@tetherto/qvac-registry-schema