alec
01/07/2022, 3:23 AMalec
01/07/2022, 3:23 AMalec
01/07/2022, 3:23 AMalec
01/07/2022, 3:24 AMalec
01/07/2022, 3:24 AMspierce7
01/07/2022, 3:28 AMdimsuz
01/07/2022, 12:35 PMdimsuz
01/07/2022, 12:44 PMrudolf.hladik
01/10/2022, 11:22 AMalec
01/10/2022, 11:26 AMjean
01/10/2022, 1:49 PMline 2:7 - TO expected, got 'COLUMN'
1 ALTER TABLE MY_TABLE
2 RENAME COLUMN field1 TO field2
Am I missing something? I though https://github.com/cashapp/sqldelight/issues/1505 would have fix this? I’m using sqldelight 1.5.2jw
01/10/2022, 6:58 PMephemient
01/10/2022, 7:04 PMjw
01/10/2022, 7:34 PMjw
01/10/2022, 7:34 PMephemient
01/10/2022, 7:37 PMephemient
01/10/2022, 7:38 PMColton Idle
01/10/2022, 9:02 PMColton Idle
01/12/2022, 9:08 PMname
that's a String? Just 5, right? Or are there some other annotations or something that could change the result?
val name: String = "default"
val name: String? = "default"
val name: String? = null
val name: String?
val name: String
My intent in the cheat sheet is to show "Hey if your field is defined like this, and your backend sends "foo", explicit null, or omits the field in json entirely, this is your result."jw
01/12/2022, 10:49 PMColton Idle
01/12/2022, 11:09 PMjw
01/12/2022, 11:34 PMjessewilson
01/12/2022, 11:45 PMclass Payment {
String currency = "USD";
long amount;
public Payment(long amount) {
this.amount = amount;
}
}
Moshi decodes {"amount": 100}
to a Payment
with a null
currency! We’re doing nasty things because Moshi works field-by-field and there’s no nice way to map field names to constructor parameter names.jessewilson
01/12/2022, 11:48 PM`{}` --> same as calling `Person()`
`{"name": "Colton"}` --> same as calling `Person(name = "Colton")`
`{"name": null}` --> same as calling `Person(name = null)`
jw
01/12/2022, 11:52 PMColton Idle
01/12/2022, 11:55 PMColton Idle
01/12/2022, 11:58 PMColton Idle
01/13/2022, 2:56 AMjw
01/13/2022, 3:15 AMspierce7
01/13/2022, 4:33 AMTheIs this something that sqldelight will verify for me, or is it up to me?file always describes how to create the latest schema in an empty database..sq