Robin
Robin
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
sure enough, thanks!
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
oh, I just ran into another case where I can't avoid sql.raw:
.where(
(eb) => eb("mal.finished_at", "-", eb.ref("mal.began_at")),
">=",
sql`'${sql.raw(`${minDuration}`)} MILLISECONDS'`,
)
.where(
(eb) => eb("mal.finished_at", "-", eb.ref("mal.began_at")),
">=",
sql`'${sql.raw(`${minDuration}`)} MILLISECONDS'`,
)
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
That avoids the issue, thanks!
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
yeah, I just realized that, I don't need sql.raw at all
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
I was looking through the code to see if there was something like an InExpression type or something, but I didn't find anything like that.
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
that doesn't seem to work, maybe I'm not following
15 replies
KKysely
Created by Robin on 1/4/2024 in #help
Type errors after 0.27.1 upgrade
as in, string[]?
15 replies
KKysely
Created by Robin on 12/29/2023 in #help
Arbitrary insert statement
Oh great! I don't know why I thought directly interpolating like that wouldn't work.
6 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
I used a subquery instead of an expression builder
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
@emiliewood I figured out a way around this limitation that worked for my case, FYI https://github.com/kysely-org/kysely/issues/670#issuecomment-1783588105
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
oh, but this still doesn't work if I left join a table that also includes on oid column 😢
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
that actually makes a ton of sense
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
oooooh:
When you leftJoin a table that has a column that some other table also has, that column becomes nullable too because it gets overridden by the similarly named column
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
I wish I understood why that works though...
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
@emiliewood thanks! I glossed right over the pick when I first read your response
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
oh interesting, that does fix it though
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
I don't understand why the pick would be any different though? It still suffers from the same left join nullable issue
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
I even tried downgrading typescript to the same version used in the project
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
Super weird, using the Nullable helper seems to work in the playground, but not in my project
42 replies
KKysely
Created by Robin on 9/20/2023 in #help
New type error in 0.26.3
Thanks, I'll take a look
42 replies