sirhype
Explore posts from serverscase when column = another column
I have a semi-complex query, and I'm trying to use a case() that includes a when() where the two values are columns (aka the two columns have the same value).
It doesn't seem to be supported, however in theory this should work. Any idea how I can make it work with Kysely?
The
.when("shahz_response", "=", "rank")
is where I'm attempting this, but this isn't working
4 replies
CDCloudflare Developers
•Created by sirhype on 12/31/2023 in #pages-help
Cannot find module with vite + react + typescript + yarn build
I'm going crazy trying to figure out the reasoning I'm getting
along with a billion other Cannot find module errors with my new Vite project. It's a vite + react + typescript project that's almost directly out of the box. When I've done this with other projects it worked, so I'm confused where I might be going wrong. Anyone seen this before?
Build command is
yarn build
, dist
is the output directory. Versions are [email protected], [email protected]
tsconfig.json
.eslint.cjs
2 replies
case() return boolean (castTo doesn't work?)
Hiya! I'm trying to determine if what I'm doing is currently possible
I have the following expression
Currently this will return:
which I can work with, however I'm trying to have it return as true/false, or at the very least a number. I've tried using castTo after .end() but it doesn't seem to work. Any advice?
2 replies
Converting a more complex query to Kysely
I wrote this query for my database, and I've been trying to convert it to use Kysely but can't seem to. I'd like to figure it out (rather than just use string SQL)
The query:
What I've got so far (WIP)
Any help is appreciated 🙂
21 replies
Types for use with leftJoin
Hiya! I'm attempting to do a leftJoin and return the result:
I'd like to have the result be a type, like
Selectable<Account & Application>
but I'm not sure if this is supported or what the proper way to do this is. Any help would be appreciated, thank you!3 replies
CDCloudflare Developers
•Created by sirhype on 3/19/2023 in #workers-help
Worker with Slash-Up Discord Slash Commands Failing
I am currently using slash-create with Cloudflare Workers to integrate Discord Slash commands. I'm getting the below error when I attempt to add the integration on Discord's side.
This all works in local mode, but not on the worker itself (or outside of local mode). I've made some modifications to the boilerplate to get it to run properly. But I never thought to check outside of local mode when I was originally setting up. Happy to share my project if anyone wants to take a look 🙂
Source is here: https://github.com/TristanWiley/procity-slash-commands
Relevant code is most likely in
src/shim/servers/cfworker.ts
and src/shim/creator.ts
. This is where I've been looking. Unfortunately this is code I did not write and are a part of the library itself, however probably outdated a bit.11 replies