Colton Idle
03/30/2023, 1:24 AMjw
03/30/2023, 1:31 AMjw
03/30/2023, 1:31 AMjw
03/30/2023, 1:32 AMAdrian Witaszak
03/30/2023, 9:17 AMhfhbd
03/30/2023, 10:11 AMMatej Drobnič
03/30/2023, 10:53 AMDerek Ellis
03/30/2023, 2:06 PMadte
03/31/2023, 1:28 AMjw
03/31/2023, 1:30 AMfindInsertRowid:
SELECT last_insert_rowid()
;
immediately after in the same transactionjw
03/31/2023, 1:30 AMinsertThing {
INSERT INTO ...;
SELECT last_insert_rowid();
}
alec
03/31/2023, 1:32 AMINSERT INTO ...
RETURNING your_id_column;
jw
03/31/2023, 1:36 AMalec
03/31/2023, 1:37 AMjw
03/31/2023, 1:37 AMColton Idle
03/31/2023, 4:56 AMToo many follow-up requests: 21
(full stacktrace in thread, stacktrace mentions both of these interceptors)
interceptor 1
class AddOutboundAcceptHeaderInterceptor @Inject constructor() : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val request = chain.request().newBuilder().addHeader("Accept", "application/json").build()
return chain.proceed(request)
}
}
interceptor 2
class AddOutboundBasicAuthHeaderInterceptor
@Inject
constructor(private val buildTimeValues: BuildTimeValues) : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val auth = "Basic ${buildTimeValues.basicAuth.encodeUtf8().base64()}"
val request = chain.request().newBuilder().addHeader("Authorization", auth).build()
return chain.proceed(request)
}
}
Jorge Bo
03/31/2023, 4:06 PMhumblehacker
03/31/2023, 9:33 PMupgrade
block on DatabaseConfiguration
).
So any pointers on where I should look or any other things to try would be greatly appreciated!s3rius
04/01/2023, 6:34 PMinterface LongId : Parcelable { val id: Long } // all implementing this interface
@JvmInline
@Parcelize
value class ProfileId(override val id: Long) : LongId
But I'm forced to provide adapters for all these id classes, and apparently I have to do that for any id column. So with a small db with just 8 tables and a few relations between them, the database creation is already a monster of just providing basically the same adapter in a ton of places. See image, and how practically every required adapter is for an id.
Is there a way to "teach" SQLDelight once about how to work with a class? Or that value classes are automatically stored via their underlying types?jw
04/01/2023, 6:39 PMhumblehacker
04/03/2023, 3:15 PMadte
04/05/2023, 11:07 PMhfhbd
04/06/2023, 11:44 AM1_000
? At sqldelight we use integer variables with string interpolation. Now we need to change each interpolation with the new format.
"|notifyQueries(${insert.id}) { emit ->
| emit("search")
| }
jw
04/06/2023, 12:38 PMalec
04/06/2023, 12:42 PMhfhbd
04/06/2023, 12:45 PMjw
04/06/2023, 12:51 PMjw
04/06/2023, 12:51 PMhfhbd
04/06/2023, 12:53 PMPaul Woitaschek
04/06/2023, 1:25 PM