ankushg
12/01/2021, 12:56 AMmap
the list after I've executed the queryPhilip Dukhov
12/02/2021, 11:56 AMval dataSource = HikariDataSource(datasourceConfig)
val driver = dataSource.asJdbcDriver()
driver.migrate(Database.Schema)
//...
private class SqlDriverTransacter(driver: SqlDriver) : TransacterImpl(driver)
fun SqlDriver.migrate(schema: SqlDriver.Schema) {
val sqlDriverTransacter = SqlDriverTransacter(this)
// ...
sqlDriverTransacter.transaction {
// ...
}
}
I don't remember exactly where from this code came from, it looks kind of like this one.
The problem is that in case of a crash inside transaction
, the database is not getting rolled back. When in my migration I have create table
and then some action, if the action fails, next time I'm getting a crash Table already exists
.
I've tried catching the error inside transaction
and running rollback
manually, but this had no effect.Paul Griffith
12/03/2021, 6:30 PMschema.sq line 17:12 - <type name real> expected, got 'BIGINT'
I'm using 1.5.3jw
12/04/2021, 5:56 AMjw
12/04/2021, 6:00 PMJohn Aoussou
12/05/2021, 1:35 PMjw
12/08/2021, 5:02 AMsaket
12/10/2021, 7:42 PMYou are using Compose for presentation logic, but aren’t using Compose for UI?by "you" are you referring to
ralf
12/12/2021, 9:48 PM@Scope
. For example our scope annotation looks like that:
@Scope
annotation class SingleIn(val value: KClass<*>)
The usage side looks similar to this:
@SingleIn(AppScope::class)
@ContributesTo(AppScope::class)
@MergeComponent(AppScope::class)
Anvil wouldn’t be able to make the connection that @SingleIn
is the actual Dagger scope.Colton Idle
12/16/2021, 9:09 PMd.medina
12/21/2021, 9:46 PMPaul Woitaschek
12/23/2021, 10:20 AM@Test
fun myTest() = runTest {
flow {
delay(10.milliseconds)
emit(Unit)
}.test {
awaitItem() shouldBe Unit
}
}
Colton Idle
12/30/2021, 4:11 PMTim Malseed
12/30/2021, 10:32 PMrunBlockingTest()
, this delay is skipped, so this function completes immediately, and the StateFlow essentially bypasses the value I’m trying to test.Javier
01/04/2022, 3:25 PMColton Idle
01/04/2022, 5:23 PMval title: String = "default"
, but then my server sends a number by accident. It seems like moshi will convert the json number into a String type. Is that right?Fanilog
01/06/2022, 4:55 PMRequestBody
after doing
val buffer = Buffer()
requestBody?.writeTo(buffer)
buffer.readByteArray()
?Benoit Quenaudon
01/06/2022, 4:58 PMDutch
01/09/2022, 12:32 AMabstract class A(
open var field1: String
)
abstract class B(
override var field1 : String
) : A(field1)
I tried to also create a corresponding PropertySpec for my class, but as a result I get the following:
public abstract class B(
override field1: String
) : A() {
public override var field1: String
}
alec
01/10/2022, 1:52 PMColton Idle
01/10/2022, 6:24 PMColton Idle
01/11/2022, 4:16 AMMatti MK
01/12/2022, 9:48 AM1 to N
B
B 1 to N
C
Sometimes I’ll need a List<A>
, sometimes just a List<B>
. Constructing the objects, like A
, based on queries seems a bit confusing to me, so wondering if someone could point me a to a sample that implements something similar? Thanks 👍jessewilson
01/13/2022, 12:41 PMxxfast
01/14/2022, 1:57 AMjs(IR)
). I’m making use of the npm-publish plugin to export my KMP library locally to npm, so that i can link
these kotlin-js artefacts from pure js projects. However, when I invoke initSqlDriver()
from jsMain, i get this on the console
wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
Has anyone encountered this before?Derek Ellis
01/14/2022, 2:07 AMColton Idle
01/15/2022, 8:12 PMalec
01/18/2022, 9:17 PMderiveSchemaFromMigrations
Benoit Quenaudon
01/25/2022, 6:28 PMDaniel Perez
01/26/2022, 9:08 PMFunSpec.returns()
call I see I can use the ClassName by providing a String for a package and a String for the name of the type, but I’m unsure how to make sure it returns with a * parameter. Am I correct in going for ClassName
here over FqName
? If so, how can I make sure it is parameterized by a *?Daniel Perez
01/26/2022, 9:08 PMFunSpec.returns()
call I see I can use the ClassName by providing a String for a package and a String for the name of the type, but I’m unsure how to make sure it returns with a * parameter. Am I correct in going for ClassName
here over FqName
? If so, how can I make sure it is parameterized by a *?parameterizedBy( STAR )
after creating the ClassName.