Skip to content

Commit 1552fe1

Browse files
authored
Merge pull request #118 from powersync-ja/update-batch-execute-description
Update executeBatch description and param names for consistency
2 parents 5e4eab8 + aacbc92 commit 1552fe1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,13 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
476476
}
477477

478478
/**
479-
* Execute a batch write (INSERT/UPDATE/DELETE) query with multiple sets of parameters
480-
* and optionally return results.
479+
* Execute a write query (INSERT/UPDATE/DELETE) multiple times with each parameter set
480+
* and optionally return results.
481+
* This is faster than executing separately with each parameter set.
481482
*/
482-
async executeBatch(query: string, params?: any[][]) {
483+
async executeBatch(sql: string, parameters?: any[][]) {
483484
await this.waitForReady();
484-
return this.database.executeBatch(query, params);
485+
return this.database.executeBatch(sql, parameters);
485486
}
486487

487488
/**

0 commit comments

Comments
 (0)