Skip to content
Source
Sign inSign up
TanStack/db

fix(sqlite): preserve persistence type contracts #1866

MergedKyleAMathews(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/1866/headmerged by KyleAMathews(GitHub profile, opens in a new tab)

Showing 9 changed files with 185 additions and 4 deletions (loading 6).

x
0 of 9 viewed, 9 left
6 additions and 0 deletions.changeset/fix-sqlite-persistence-type-contracts.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/db-sqlite-persistence-core': patch
+'@tanstack/expo-db-sqlite-persistence': patch
+---
+​
+Preserve schema input and output inference when persisted collection options are passed to `createCollection`. Accept Expo's native SQLite database type and preserve transaction callback results while validating bind values against Expo's supported domain.
53 additions and 4 deletionspackages/db-sqlite-persistence-core/src/persisted.tsModified
View file
@@ -20,6 +20,7 @@
CollectionConfig,
CollectionIndexMetadata,
DeleteMutationFnParams,
+ InferSchemaOutput,
InsertMutationFnParams,
LoadSubsetFn,
LoadSubsetOptions,
@@ -2740,12 +2741,58 @@
export function persistedCollectionOptions<
+ TSchema extends StandardSchemaV1,
+ TKey extends string | number,