Typing issue when working with onConflict
Hi, so i was trying to use some of examples https://kysely-org.github.io/kysely-apidoc/classes/InsertQueryBuilder.html#onConflict
I want to update column of json type in case of conflict
and get this error
However query goes ok
I guess that might be connected with https://github.com/RobinBlomberg/kysely-codegen because I am working with generated types
I want to update column of json type in case of conflict
and get this error
However query goes ok
I guess that might be connected with https://github.com/RobinBlomberg/kysely-codegen because I am working with generated types
GitHub
Generate Kysely type definitions from your database! - GitHub - RobinBlomberg/kysely-codegen: Generate Kysely type definitions from your database!
Documentation for kysely
Solution
The issue is a mismatch between the insert and select types. That's essentially trying to assing
https://kyse.link/?p=s&i=uJp8OhW5wv4koycBFI8S
Json to string. This is something Kysely should handle, but it's really difficult in that case. What I'd do is thishttps://kyse.link/?p=s&i=uJp8OhW5wv4koycBFI8S