koskimas
koskimas
KKysely
Created by bombillazo on 1/18/2025 in #help
Generating dynamic raw query help
Try this instead
const x = sql`SELECT ${sql.raw(name)}(${sql.join(input)})`;
const x = sql`SELECT ${sql.raw(name)}(${sql.join(input)})`;
4 replies
KKysely
Created by bombillazo on 1/18/2025 in #help
Generating dynamic raw query help
You're joining a bunch of objects into a string here.
input.join(',')
input.join(',')
4 replies
KKysely
Created by bombillazo on 1/19/2025 in #help
Convert record from Function call (RPC) to JSON
In case you're using postgres
4 replies
KKysely
Created by bombillazo on 1/19/2025 in #help
Convert record from Function call (RPC) to JSON
Return to_json(theRow) instead of the raw record
4 replies
KKysely
Created by dmt on 1/17/2025 in #help
Performance impact of "$if" ?
Of course only on development. Only on IDE intellisense. How could that function affect runtime performance? Kysely only builds SQL strings. Nothing you do to build a SQL string can ever take a meaningful time.
7 replies
KKysely
Created by dmt on 1/17/2025 in #help
Performance impact of "$if" ?
It's impossible to predict. But if you start seeing long pauses before you get intellisense, try to reduce the $if calls to see if it helps. The impact is much smaller now than it was when I wrote that doc.
7 replies