MCPcopy Create free account
hub / github.com/TanStack/db / resolveSchemaMismatchPolicy

Function resolveSchemaMismatchPolicy

packages/expo-db-sqlite-persistence/src/expo.ts:47–56  ·  view source on GitHub ↗
(
  explicitPolicy: ExpoSQLiteSchemaMismatchPolicy | undefined,
  mode: PersistedCollectionMode,
)

Source from the content-addressed store, hash-verified

45}
46
47function resolveSchemaMismatchPolicy(
48 explicitPolicy: ExpoSQLiteSchemaMismatchPolicy | undefined,
49 mode: PersistedCollectionMode,
50): ExpoSQLiteCoreSchemaMismatchPolicy {
51 if (explicitPolicy) {
52 return normalizeSchemaMismatchPolicy(explicitPolicy)
53 }
54
55 return mode === `sync-present` ? `sync-present-reset` : `sync-absent-error`
56}
57
58function createAdapterCacheKey(
59 schemaMismatchPolicy: ExpoSQLiteCoreSchemaMismatchPolicy,

Callers 1

getAdapterForCollectionFunction · 0.70

Calls 1

Tested by

no test coverage detected