File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
core/src/commonIntegrationTest/kotlin/com/powersync Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 33## 1.0.0-BETA31
44
55* Added helpers for Attachment syncing.
6+ * Fix ` getNextCrudTransaction() ` only returning a single item.
67
78## 1.0.0-BETA30
89
Original file line number Diff line number Diff line change @@ -369,4 +369,25 @@ class DatabaseTest {
369369 val count = database.get(" SELECT COUNT(*) from people" ) { it.getLong(0 )!! }
370370 count shouldBe 1
371371 }
372+
373+ @Test
374+ fun testCrudTransaction () =
375+ databaseTest {
376+ database.execute(
" INSERT INTO users (id, name, email) VALUES (uuid(), ?, ?)" ,
listOf (
" a" ,
" [email protected] " ))
377+
378+ database.writeTransaction {
379+ it.execute(
" INSERT INTO users (id, name, email) VALUES (uuid(), ?, ?)" ,
listOf (
" b" ,
" [email protected] " ))
380+ it.execute(
" INSERT INTO users (id, name, email) VALUES (uuid(), ?, ?)" ,
listOf (
" c" ,
" [email protected] " ))
381+ }
382+
383+ var transaction = database.getNextCrudTransaction()
384+ transaction!! .crud shouldHaveSize 1
385+ transaction.complete(null )
386+
387+ transaction = database.getNextCrudTransaction()
388+ transaction!! .crud shouldHaveSize 2
389+ transaction.complete(null )
390+
391+ database.getNextCrudTransaction() shouldBe null
392+ }
372393}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ development=true
1717RELEASE_SIGNING_ENABLED =true
1818# Library config
1919GROUP =com.powersync
20- LIBRARY_VERSION =1.0.0-BETA30
20+ LIBRARY_VERSION =1.0.0-BETA31
2121GITHUB_REPO =https://github.com/powersync-ja/powersync-kotlin.git
2222# POM
2323POM_URL =https://github.com/powersync-ja/powersync-kotlin/
You can’t perform that action at this time.
0 commit comments