Skip to content

Commit ceccd12

Browse files
committed
More defaults for readonly: true/false.
1 parent c34fd11 commit ceccd12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/api/src/impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class ConnectionPoolImpl
7070
args?: SqliteArguments,
7171
options?: (QueryOptions & ReserveConnectionOptions) | undefined
7272
): Promise<RunResult> {
73-
const r = await this.reserveConnection(options);
73+
const r = await this.reserveConnection({ readonly: false, ...options });
7474
try {
7575
return r.connection.run(query, args, options);
7676
} finally {
@@ -108,7 +108,7 @@ export class ConnectionPoolImpl
108108
args?: SqliteArguments,
109109
options?: (StreamOptions & ReserveConnectionOptions) | undefined
110110
): AsyncGenerator<T[], any, unknown> {
111-
const r = await this.reserveConnection(options);
111+
const r = await this.reserveConnection({ readonly: true, ...options });
112112
try {
113113
return r.stream<T>(query, args, options);
114114
} finally {

0 commit comments

Comments
 (0)