sqldelight Questions

2

Solved

I have problem with saving data to sqldelight 1.4 in Android app. I created table: CREATE TABLE myTable( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT ); In repo class I have insert f...
Zapata asked 23/1, 2021 at 20:17

2

Solved

I'm trying to use sqldelight to insert an item, but to also return the id of the item after it's inserted. There doesn't seem to be a way to do this in sqldelight. I can call something like SELECT...
Glans asked 10/12, 2018 at 15:16

2

I am trying to create a small app using Kotlin Multiplatform where i can save book titles and their authors but i'm struggling with the data classes and how to map them together so that i get the a...
Scheller asked 31/3, 2022 at 14:8

5

Solved

I have a KMM project and want to use SqlDelight library, but when I build the project database schema not generated and table entities also. actual class DatabaseDriverFactory(private val context: ...
Chessy asked 27/11, 2020 at 9:45

4

I have a relatively large db that may take 1 to 2 minutes to initialise, is it possible to load a pre-populated db when using sqldelight (kotlin multiplatform) instead of initialising the db on app...
Arpent asked 4/8, 2019 at 8:10

2

I am trying to add more columns in table in SQLDelight. I have made a migration file 1.sqm. In migration file it gives error that no table found. My build.gradle.kts: sqldelight { database("...

2

Solved

After modifying the sq file by renaming one of the tables and adding one more table I didn't find any place to specify that database schema or version has been changed and I want no migration - jus...
Custody asked 8/12, 2020 at 13:42

1

Android Studio gives me the following error code after I copied my project. Duplicate content roots detected: Path [/home/addi/AndroidStudioProjects/appfolder/appname/app/build/generated/sqld...
Armond asked 28/5, 2022 at 16:55

0

This is my table structure CREATE TABLE Missions( MissionID INTEGER NOT NULL UNIQUE, MilestoneID INTEGER NOT NULL, MissionExpiry TEXT, MissionStatus TEXT, Count INTEGER DEFAULT 0, MilestoneLi...
Diverting asked 27/5, 2022 at 9:3

1

I'm currently looking at having a KMM application backed by SQLdelight for all domain-related operations. SQLdelight seems to provide really nice interfaces, however it seems like all the write cal...
Prismatic asked 23/4, 2021 at 15:6

1

Solved

I want to model relationships with SQLDelight, especially a one to many relationship. I have 2 tables: recipe and ingredient. For simplicity they look like this: CREATE TABLE recipe ( id INTEGER N...
Damson asked 3/8, 2021 at 7:53

4

I'm wondering how to write unit tests for SQLDelight on KMM. First of all, I can't even add the SQLDelight dependency correctly. val commonTest by getting { dependencies { implementation(kotlin(...

1

Ignoring multiplatform advantages, is there any advantage of using room over sqldelight?
Titoism asked 26/7, 2019 at 5:22

2

There are apparently Kotlin coroutines extension functions for SqlDelight, but I don't know how to implement them since I can't find documentation. I have a normal query that looks like this: val...
Merkle asked 23/2, 2020 at 6:59

1

Solved

We want to migrate our App from Room to SQLDelight to reuse it on iOS (it is a Multiplatform project). I noticed however that SQLDelight is much slower than Room. For some queries it is around 10 t...
Relativity asked 23/12, 2020 at 13:49

0

In some of the stack overflow answers say 1.create new table and drop old tables. how to do that? 2.what is the use of sqm file and when we need to use? 3.what's is the use of deriveSchemaFromMigra...
Ladino asked 16/10, 2020 at 3:28

1

Solved

I am working on kotlin multiplatform project. I successfully added several libs to my build.gradle (ktor, coroutines, ...). I also added sqldelight to common, android and ios sourcesets. My ios dep...
Disrespectful asked 15/7, 2020 at 13:39

2

Solved

I am implementing repository pattern in RxJava using SqlBrite/SqlDelight for offline data storage and retrofit for Http requests Here's a sample of that: protected Observable<List<Item>&...
Leopoldine asked 18/5, 2017 at 5:43
1

© 2022 - 2024 — McMap. All rights reserved.