jw
06/21/2021, 3:45 PMRak
06/24/2021, 3:37 PMJorge Castillo
06/28/2021, 10:50 AMsqldelight
regarding Gradle caching? Seems that making kotlin compile depend on the generation task is causing wrong cached builds on my side.
tasks.withType<KotlinCompile> {
dependsOn("generateMainSubscriptionsDbInterface")
}
Having that in place then running ./gradlew clean build
a few times, files are generated fine the first time, then they are removed from second time on, and they don't get regenerated ever, neither by running the generation task manually. It only gets back to life after removing the .gradle/
dir. If I run the task manually after that, it generates the stuff again.
I've also observed that the idea plugin allows to generate automatically after editing .sq
files, but that is not enough for someone cloning the repo the first time or for someone not touching those files ever.
Thanks!alec
06/28/2021, 11:45 AMdimsuz
06/28/2021, 2:52 PMSqliteOpenHelper
stuff so it shouldn't be specific to sqldelight, but then I got pointed to some special handling made by Room in this regard: RoomDatabase.enableMultiInstanceInvalidation()
. This has a side-effect of working correctly without "database is locked" exceptions.
Is there anything like this in SqlDelight?alec
06/28/2021, 3:47 PMdimsuz
06/28/2021, 3:51 PMJorge Castillo
07/06/2021, 9:07 AMON CONFLICT
working for postgresql dialect in sqldelight?Derek Ellis
07/07/2021, 2:56 PMINSERT
and SELECT
statements be grouped? For instance, to return the ID of a newly inserted row.saket
07/07/2021, 3:35 PMinsert {
INSERT INTO ...
SELECT last_insert_rowid();
}
saket
07/07/2021, 3:36 PMSELECT changes();
if you want the number of rows affected by an update or deleteDerek Ellis
07/07/2021, 3:43 PMUnit
even with the select statement, and I just found an issue on github for this that I had missed 😳(https://github.com/cashapp/sqldelight/issues/2466)saket
07/07/2021, 3:52 PMrudolf.hladik
07/14/2021, 7:37 AMjw
07/14/2021, 10:14 AMjw
07/14/2021, 10:15 AMJorge Castillo
07/14/2021, 12:33 PMCREATE TABLE
postgresql statements expected to create tables automatically? I'm running a backend app and getting errors like:
subscriptionsdb | 2021-07-14 12:30:42.092 UTC [56] ERROR: relation "userentity" does not exist at character 15
subscriptionsdb | 2021-07-14 12:30:42.092 UTC [56] STATEMENT: SELECT *
subscriptionsdb | FROM userEntity
subscriptionsdb | WHERE slack_user_id = $1
as if it wouldn't be able to find the userEntity
table.
CREATE TABLE IF NOT EXISTS userEntity (
user_id SERIAL PRIMARY KEY,
slack_user_id VARCHAR NOT NULL,
slack_channel_id VARCHAR
);
insert:
INSERT INTO userEntity(slack_user_id, slack_channel_id)
VALUES (?, ?);
selectAll:
SELECT *
FROM userEntity;
select:
SELECT *
FROM userEntity
WHERE slack_user_id = ? AND slack_channel_id = ?;
selectByUserId:
SELECT *
FROM userEntity
WHERE user_id = ?;
selectBySlackUserId:
SELECT *
FROM userEntity
WHERE slack_user_id = ?;
selectBySlackChannelId:
SELECT *
FROM userEntity
WHERE slack_channel_id = ?;
delete:
DELETE FROM userEntity
WHERE user_id = ?
RETURNING *;
dimsuz
07/30/2021, 3:22 PMFiles
and table of Folders
and I want to select all files and for each a list of folders to which it belongs. Something like this "pseudo" query:
SELECT file.id, file.name, COLLECT_IN_LIST(folder.name) as List<String>
FROM file
JOIN folder on folder.fileId == file.id
GROUP BY folder.name;
And have data class Result(id: String, name: String, folders: List<String>
.
But no COLLECT_IN_LIST aggregate function exists...jw
07/30/2021, 3:24 PMdimsuz
07/30/2021, 3:26 PMDominaezzz
07/30/2021, 9:15 PMDominaezzz
07/30/2021, 9:16 PMdimsuz
08/02/2021, 9:14 AMWilliam Reed
08/03/2021, 6:30 PMleakcanary-object-watcher-android
module. I took a look through that and it seems like it is responsible for creating all the watchers (activity, fragment, VM, etc.), but what I don’t understand is how a separate LeakCanary application ends up on the device as well
the project has quite a few modules so I would appreciate some pointers 🙂Colton Idle
08/06/2021, 6:16 AMWilliam Reed
08/12/2021, 1:23 PMmoshi
in my app and I need to deserialize an escaped json string. I want to do this in a @FromJson
adapter, but I’m not so sure how to do that.
e.g. the raw json i have to deserialize looks something like this where the metadata
is an escaped json string. so i want to make an adapter for the metadata
object specifically
{
"time_zone": "America/New_York",
"metadata": "{\"foo\":\"bar\"}"
}
dimsuz
08/17/2021, 5:54 PMjw
08/17/2021, 5:55 PMdimsuz
08/17/2021, 5:55 PMralf
08/17/2021, 6:19 PM@Component
or @MergeComponent
, but in no other module. That would ideally be the app module.