tanstack-db-pglite 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drizzle.d.ts +3 -1
- package/dist/sql.d.ts +2 -1
- package/package.json +1 -1
package/dist/drizzle.d.ts
CHANGED
|
@@ -15,5 +15,7 @@ export declare function drizzleCollectionOptions<Table extends PgTable>({ startS
|
|
|
15
15
|
sync?: (params: Pick<SyncParams<Table>, 'write' | 'collection'>) => Promise<void>;
|
|
16
16
|
}): CollectionConfig<Table['$inferSelect'], string, ReturnType<CreateSelectSchema<Table['$inferSelect']>>, {
|
|
17
17
|
runSync: () => Promise<void>;
|
|
18
|
-
}
|
|
18
|
+
}> & {
|
|
19
|
+
schema: ReturnType<CreateSelectSchema<Table['$inferSelect']>>;
|
|
20
|
+
};
|
|
19
21
|
export {};
|
package/dist/sql.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PGlite } from '@electric-sql/pglite';
|
|
2
|
+
import type { PGliteWorker } from '@electric-sql/pglite/worker';
|
|
2
3
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
4
|
import type { CollectionConfig, DeleteMutationFnParams, InsertMutationFnParams, SyncConfig, UpdateMutationFnParams } from '@tanstack/db';
|
|
4
5
|
type Output<T extends StandardSchemaV1> = StandardSchemaV1.InferOutput<T>;
|
|
5
6
|
type SyncParams<ItemType extends Record<string, unknown>> = Parameters<SyncConfig<ItemType, string>['sync']>[0];
|
|
6
7
|
export declare function sqlCollectionOptions<Schema extends StandardSchemaV1<Record<string, unknown>>>({ startSync, ...config }: {
|
|
7
|
-
db: PGlite;
|
|
8
|
+
db: PGlite | PGliteWorker;
|
|
8
9
|
tableName: string;
|
|
9
10
|
primaryKeyColumn: Extract<keyof Output<Schema>, string>;
|
|
10
11
|
schema: Schema;
|