Skip to content

Commit 4413d09

Browse files
Remove unused class. Add readme limitation
1 parent 2776b30 commit 4413d09

File tree

3 files changed

+4
-62
lines changed

3 files changed

+4
-62
lines changed

packages/drizzle-driver/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ For more information on how to use Drizzle queries in PowerSync, see [here](http
155155
## Known limitations
156156

157157
- The integration does not currently support nested transactions (also known as `savepoints`).
158+
- `findMany` queries execute with a write connection if not wrapped in an explicit `read only` transaction.

packages/drizzle-driver/src/sqlite/PowerSyncSQLitePreparedQuery.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ export class PowerSyncSQLitePreparedQuery<
7171
const params = fillPlaceholders(this.query.params, placeholderValues ?? {});
7272
this.logger.logQuery(this.query.sql, params);
7373
return this.useContext(async (ctx) => {
74-
const rs = await ctx.execute(this.query.sql, params);
75-
return rs;
74+
return await ctx.execute(this.query.sql, params);
7675
});
7776
}
7877

@@ -81,7 +80,7 @@ export class PowerSyncSQLitePreparedQuery<
8180
if (!fields && !customResultMapper) {
8281
const params = fillPlaceholders(query.params, placeholderValues ?? {});
8382
logger.logQuery(query.sql, params);
84-
return await this.contextProvider.useReadContext(async (ctx) => {
83+
return await this.useContext(async (ctx) => {
8584
return await ctx.getAll(this.query.sql, params);
8685
});
8786
}
@@ -101,7 +100,7 @@ export class PowerSyncSQLitePreparedQuery<
101100
const { fields, customResultMapper } = this;
102101
const joinsNotNullableMap = (this as any).joinsNotNullableMap;
103102
if (!fields && !customResultMapper) {
104-
return this.contextProvider.useReadContext(async (ctx) => {
103+
return this.useContext(async (ctx) => {
105104
return await ctx.get(this.query.sql, params);
106105
});
107106
}

packages/drizzle-driver/src/sqlite/QueryContext.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)