Skip to content

Commit 1e5b8bd

Browse files
committed
Rename to getCrudTransactions
1 parent 72c4951 commit 1e5b8bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/powersync_core/lib/src/database/powersync_db_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ mixin PowerSyncDatabaseMixin implements SqliteConnection {
527527
/// Unlike [getCrudBatch], this only returns data from a single transaction at a time.
528528
/// All data for the transaction is loaded into memory.
529529
Future<CrudTransaction?> getNextCrudTransaction() {
530-
return nextCrudTransactions().firstOrNull;
530+
return getCrudTransactions().firstOrNull;
531531
}
532532

533533
/// Returns a stream of completed transactions with local writes against the
@@ -567,7 +567,7 @@ mixin PowerSyncDatabaseMixin implements SqliteConnection {
567567
///
568568
/// If there is no local data to upload, the stream emits a single `onDone`
569569
/// event.
570-
Stream<CrudTransaction> nextCrudTransactions() async* {
570+
Stream<CrudTransaction> getCrudTransactions() async* {
571571
var lastCrudItemId = -1;
572572
const sql = '''
573573
WITH RECURSIVE crud_entries AS (

packages/powersync_core/test/crud_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,15 @@ void main() {
280280
});
281281
}
282282

283-
await expectLater(powersync.nextCrudTransactions(), emitsDone);
283+
await expectLater(powersync.getCrudTransactions(), emitsDone);
284284

285285
await createTransaction(5);
286286
await createTransaction(10);
287287
await createTransaction(15);
288288

289289
CrudTransaction? lastTransaction;
290290
final batch = <CrudEntry>[];
291-
await for (final transaction in powersync.nextCrudTransactions()) {
291+
await for (final transaction in powersync.getCrudTransactions()) {
292292
batch.addAll(transaction.crud);
293293
lastTransaction = transaction;
294294

0 commit comments

Comments
 (0)