Marcin Wisniowski
03/12/2023, 5:59 AMCall
and execute()
instead of coroutines on my inner request fixed the issue.Davide Giuseppe Farella
03/12/2023, 8:47 AMclass MyViewModel {
val state = launchModulecule {
val lazyPagingItems = pagedFlow.collectAsLazyPagingItems()
MyState(
items = lazyPagingItems,
stuff = someStuff
)
}
}
Is this correct?veyndan
03/13/2023, 1:46 PMBig Chungus
03/14/2023, 5:29 PMColton Idle
03/15/2023, 5:34 AMDavid Carr
03/16/2023, 11:57 PMNo table found with name
which would imply this is not supportedhfhbd
03/17/2023, 2:07 AMDavid Carr
03/17/2023, 2:39 AMeygraber
03/17/2023, 3:09 AMmyanmarking
03/17/2023, 6:09 PMDavide Giuseppe Farella
03/17/2023, 6:39 PMCREATE VIEW IF NOT EXISTS screenplay AS
SELECT
movie.tmdbId AS movieTmdbId,
NULL AS tvShowTmdbId,
...
FROM movie
UNION ALL
SELECT
NULL AS movieTmdbId,
tvShow.tmdbId AS tvShowTmdbId,
...
FROM tvShow;
where movieTmdbId
and tvShowTmdbId
are of types
sealed interface ScreenplayTmdbId
value class MovieTmdbId : ScreenplayTmdbId
value class TvShowTmdbId: ScreenplayTmdbId
I would like to query a single row by id.
It would be awesome if SqlDelight could infer the super-type ScreenplayTmdbId
, but I see that’s not happening, as the following resolves tmdbId
as String
WHERE IFNULL(movieTmdbId, tvShowTmdbId) == :tmdbId;
I tried then to separate into two separate queries, but, somehow, the first of the following queries compiles, while the second one doesn’t
findByMovieId:
SELECT
movieTmdbId,
tvShowTmdbId,
...
FROM screenplay
WHERE movieTmdbId == :tmdbId;
findByTvShowId:
SELECT
movieTmdbId,
tvShowTmdbId,
...
FROM screenplay
WHERE tvShowTmdbId == :tmdbId;
Caused by: java.lang.IllegalArgumentException: Cannot bind unknown types or nullI’m pretty sure I’m doing something wrong
spierce7
03/17/2023, 9:44 PMjw
03/17/2023, 9:56 PMjessewilson
03/18/2023, 12:10 AMTim Malseed
03/18/2023, 2:36 AMjw
03/18/2023, 2:37 AMjw
03/18/2023, 2:38 AMjw
03/18/2023, 2:38 AMTim Malseed
03/18/2023, 2:39 AMTim Malseed
03/18/2023, 2:39 AMTim Malseed
03/18/2023, 2:41 AMjw
03/18/2023, 2:42 AMTim Malseed
03/18/2023, 2:42 AMjw
03/18/2023, 2:42 AMTim Malseed
03/18/2023, 2:43 AMTim Malseed
03/18/2023, 2:47 AMContent observers, which allow apps to listen for changes in data in a content provider, are also affected by the changes in Android’s background processing restrictions.
Starting with Android 9 (API level 28), the system limits the frequency at which content observers receive notifications about changes in data. Specifically, content observers are now subject to the same background processing restrictions as other types of services and apps.
Tim Malseed
03/18/2023, 2:50 AMonResume()
or something.jw
03/18/2023, 2:54 AMTim Malseed
03/18/2023, 5:53 AMDavide Giuseppe Farella
03/19/2023, 8:38 AM