fix(sqlite): preserve persistence type contracts - #1866
KyleAMathews wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change updates persisted collection schema inference and aligns the Expo SQLite driver with Expo’s native types. It also preserves transaction callback results, validates bind values, and adds type-level and runtime tests. ChangesSQLite persistence contracts
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/react-router-with-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 165 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 7.34 kB ℹ️ View Unchanged
|
Summary
persistedCollectionOptionsis passed tocreateCollectionexpo-sqliteoverloadsvoidHistorical context
The schema-composition gap dates to the original helper API; the stale #1453 explored the same overload direction. The Expo database boundary was handwritten rather than derived from Expo's real overloads, and the test double returned callback values even though the vendor API returns
void, masking the transaction-result bug.This PR intentionally does not adopt the coordinator-wire or atomic-resume extensions proposed in #1845 and #1846; those remain separate design work.
Verification
The schema oracle fails on the previous
mainbecause the row degrades toobject/Record<string, unknown>. A hostile Expo implementation that trusts the vendor transaction return fails by returningundefined; the repaired driver captures the callback result outside the vendor boundary.Summary by CodeRabbit