Skip to content

Commit

Permalink
fix: Drizzle query returning an array-in-array type: (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriztiaan authored Dec 10, 2024
1 parent a547fc6 commit ed5bb49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-mugs-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/drizzle-driver': patch
---

Fixed a typing issue related to queries returning multiple results when used in `db.watch()`.
2 changes: 1 addition & 1 deletion packages/drizzle-driver/src/sqlite/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { DrizzleConfig } from 'drizzle-orm/utils';
import { toCompilableQuery } from './../utils/compilableQuery';
import { PowerSyncSQLiteSession, PowerSyncSQLiteTransactionConfig } from './sqlite-session';

export type DrizzleQuery<T> = { toSQL(): Query; execute(): Promise<T> };
export type DrizzleQuery<T> = { toSQL(): Query; execute(): Promise<T | T[]> };

export class PowerSyncSQLiteDatabase<
TSchema extends Record<string, unknown> = Record<string, never>
Expand Down

0 comments on commit ed5bb49

Please sign in to comment.