diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/wordlist/repo/impl/GeneratorWordlistRepositoryImpl.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/wordlist/repo/impl/GeneratorWordlistRepositoryImpl.kt index 225261a9..f1b91af1 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/wordlist/repo/impl/GeneratorWordlistRepositoryImpl.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/common/service/wordlist/repo/impl/GeneratorWordlistRepositoryImpl.kt @@ -55,7 +55,7 @@ class GeneratorWordlistRepositoryImpl( name = name, createdAt = now, ) - val wordlistId = db.generatorWordlistQueries + val wordlistId = db.utilQueries .getLastInsertRowId() .executeAsOne() wordlist.forEach { word -> diff --git a/common/src/commonMain/sqldelight/com/artemchep/keyguard/data/util.sq b/common/src/commonMain/sqldelight/com/artemchep/keyguard/data/util.sq new file mode 100644 index 00000000..0cfd5466 --- /dev/null +++ b/common/src/commonMain/sqldelight/com/artemchep/keyguard/data/util.sq @@ -0,0 +1,2 @@ +getLastInsertRowId: +SELECT last_insert_rowid();