Mark
02/23/2025, 5:43 AMUPDATE
that returns the original values being replaced. It seems RETURNING
is the way to go but sqldelight won’t allow the WITH
table columns to be referenced like this. Is this a limitation of sqldelight or have I got the syntax wrong?
WITH old_values AS (
SELECT id, date FROM history
WHERE date NOT GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'
)
UPDATE history
SET date = '1970-01-01'
WHERE id IN (SELECT id FROM old_values)
RETURNING old_values.date; // compilation error
alireza_rmz
02/23/2025, 1:29 PMDrake Gebhart
02/25/2025, 1:57 AMval path = "applog.txt".toPath()
FileSystem.SYSTEM.appendingSink(path).buffer().use { sink ->
sink.writeUtf8(message)
}
I get an error on both iOS and Android
Caused by: java.io.FileNotFoundException: applog.txt: open failed: EROFS (Read-only file system)
at libcore.io.IoBridge.open(IoBridge.java:492)
at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
at okio.Okio__JvmOkioKt.sink(JvmOkio.kt:173)
Looking around it looks like Okio w/ KMP works in common now but I'm not seeing many examples?Rohan Maity
02/25/2025, 7:10 PM"Connection" to "Upgrade",
"Sec-WebSocket-Extensions" to "permessage-deflate",
"Upgrade" to "websocket",
"Sec-WebSocket-Version" to "13",
"Sec-WebSocket-Key" to secWebSocketKeyValue
ursus
03/03/2025, 3:25 PM@SingleInstance(AppScope::class) <--------
@ContributesBinding(AppScope::class) <--------
class DocsRepositoryImpl @Inject constructor(
...
) : DocsRepository
I'd assume most anvil
users have something like this
Is there a way to do away with the AppScope::class
literal duplication?Lukasz Kalnik
03/05/2025, 9:38 AMandroid.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
. However the same URL opens without problems on the same mobile device in Chrome browser. Also it's independent if I'm in the mobile network or WiFi.
Also running adb shell ping
on this URL gets an unknown host.ursus
03/06/2025, 8:03 PMjava.util.ConcurrentModificationException
at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)
at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:778)
at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:335)
at app.cash.sqldelight.BaseTransacterImpl.postTransactionCleanup(Transacter.kt:289)
at app.cash.sqldelight.TransacterImpl.transactionWithWrapper(Transacter.kt:376)
at app.cash.sqldelight.TransacterImpl.transaction(Transacter.kt:349)
at app.cash.sqldelight.Transacter$DefaultImpls.transaction$default(Transacter.kt:94)
at ...my code
I'm lately seeing this in tests (when driving the db with jdbc)
anyone seen this before? rerunning makes it go away -_-Kim
03/10/2025, 2:55 AMMark
03/18/2025, 9:52 AMSqlDriver.execute
documentation, non insert/delete/update SQL return 0, but when I use VACUUM INTO
I get 1 (mostly, though 0 sometimes which I presume is when nothing changed). Is this expected?Christopher Mederos
03/19/2025, 1:06 AMAleksandar Ilic
03/20/2025, 12:38 PMcash-app-paging-runtime-ui-kit
. Got stuck with something for a while.
I have a KMP shared library which gets exported as XCFramework so that native iOS app can use the data layer which exposes Flow<androidx.paging.PagingData<T>>
.
When I added `api("app.cash.paging:paging-runtime-uikit")`to iosMain
in shared library, for native iOS project to get PagingCollectionViewController
, I started getting following error when assembleXCFramework
starts.
The error is:
* Source files:
* Compiler version: 2.1.10
* Output kind: FRAMEWORK
e: java.lang.IllegalStateException: IrClassSymbolImpl is unbound. Signature: androidx.paging/NullPaddedList|null[0]
at org.jetbrains.kotlin.ir.symbols.impl.IrSymbolBase.getOwner(IrSymbolImpl.kt)
Both paging libraries (androidx and cashapp) are at 3.3.0-alpha02
. Anyone have any idea what is wrong here? Any hint is appreciated. Thanks!Seth Madison
03/21/2025, 4:09 AMkeep
the types of the method arguments? We have a situation where we pass serialized data in the @Body
of a request, and the plugin won’t automatically keep those types.
I guess if it did, we’d need a different name for the plugin, since it would be keeping request AND response types.David B
03/21/2025, 8:57 AMtimestamp
and timestampz
aren’t currently modelled in SQLDelight as java.time.Instant
value in Java / Kotlin. They’re modelled as LocalDateTime
and OffsetDateTime
instead: https://sqldelight.github.io/sqldelight/2.0.2/jvm_postgresql/types/
The naming of these column types in Postgres is somewhat confusing. The “with timezone” makes it sound like it’s storing some timezone data in your column. It isn’t. The “with timezone” only affects how a String is converted to and from a Timestamp when you’re using a SQL Client. You’re telling Postgres “I want you to interpret my string in the context of the Postgres server’s timezone” or “I want you to display these timestamps with respect to whatever timezone I’ve set in the Postgres server”. These String-based concerns have no relevance when you’re reading and writing a value from a Java object that’s backed by an unambiguous Long milliseconds-since-Epoch UTC value.
Anyway, to cut a long story short, I think that the choice of Instant
is the most appropriate way of reading and writing these timestamp (milliseconds since Epoch) values. I’d be interested to hear your thoughts, and whether this discussion has already been held. Thanks.ursus
03/22/2025, 8:03 PMsqldelight
in ktor server a bad idea? I'm already familiar with it but I'm unsure about the schema creation, ddl etc, since sqldelight seems to be driven by the DDL - which from what I gather is not used in backend apps? (I'm a android developer, backend noob)Nikky
03/24/2025, 10:30 PMRETURNING (xmax = 0) AS inserted
is a trick to determine if a row got inserted or updated (and i hope it still works) but sqldelight does not know what xmax
is
anyone got ideas on this ?
from: https://stackoverflow.com/questions/39058213/differentiate-inserted-and-updated-rows-in-upsert-using-system-columnsalexhelder
03/26/2025, 9:41 PMAgustín Ponce
04/01/2025, 8:11 AMZoltan Demant
04/03/2025, 9:25 AMFlow<List<T>>
for each of its pages, that then gets combined into the final Flow<List<T>>
with all the items?Colton Idle
04/10/2025, 6:39 PMuli
04/14/2025, 3:10 PMRyan Woodcock
04/17/2025, 1:29 AMRohan Maity
04/17/2025, 2:07 PM"kotlinx.coroutines.flow.mapNotNull"
using kotlin poet?
I tried the below it does not add import for the extension function
FileSpec.builder(packageName, factoryClassName)
.addImport("kotlinx.coroutines.flow", "mapNotNull")
Adam S
04/19/2025, 9:56 AMid INT AS VALUE
shows an error for me, "<type name real> expected, got 'INT'". Should it be id INTEGER AS VALUE
?
https://sqldelight.github.io/sqldelight/2.0.2/jvm_sqlite/types/#value-typesNabeel
04/24/2025, 6:19 PMPearce Keesling
04/30/2025, 4:50 PMimmediateClockFlow
. Makes me think that I am somehow emitting twice before the output buffer is able to receive a value. Any tips on how I should hunt that down? Stack trace in 🧵alp
05/01/2025, 10:15 PMCache-Control
response headers, I noticed that if memory cache is enabled and there is an image in the cache for the requested key, then the cache control header is not respected because cached value is returned before CacheControlCacheStrategy
is queried. Is it an expected behavior or there is a way to configure coil to respect cache control with the memory cache enabled?Colton Idle
05/02/2025, 12:57 AMTolriq
05/04/2025, 7:37 PMMateu
05/05/2025, 3:17 PM.konan/dependencies/llvm-16.0.0-x86_64-linux-essentials-80/bin/ld.lld command returned non-zero exit code: 1.
output:
ld.lld: error: unable to find library -lsqlite3
FAILURE: Build failed with an exception.
Should something be configured?
In iOS projects I add the linkerOpts.add("-lsqlite3"), but don't know how to do this in a linux native project.
ThanksRohan Maity
05/05/2025, 3:47 PM