You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(solid-db): support findOne in useLiveQuery (#1403)
* test(solid-db): add findOne tests for useLiveQuery
Add runtime and type tests for findOne support in solid-db's useLiveQuery.
These tests currently fail, reproducing #1399.
Fixes#1399
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: apply automated fixes
* fix(solid-db): support findOne in useLiveQuery
Update type overloads to use InferResultType<TContext> so findOne queries
return T | undefined instead of Array<T>. Add SingleResult/NonSingleResult
overloads for pre-created collections. Check config.singleResult at runtime
to return the first element instead of the full array.
Fixes#1399
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: add changeset for solid-db findOne fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
`useLiveQuery` with `.findOne()` returned an array instead of a single object. Updated type overloads to use `InferResultType<TContext>` so findOne queries return `T | undefined`, and added a runtime `singleResult` check to return the first element instead of the full array.
0 commit comments