-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Allow executing raw queries with a more idiomatic way #455
Comments
Hey 👋 I think this might fit const { rows } = await db.executeQuery(sql<{ result: number }>`select 1 as result`)
rows[0].result |
its also good |
does this still work? I am trying to do
and I keep getting |
ok this works ok await sql`ALTER SCHEMA "test" RENAME TO "test23"`.execute(trx) but when I try to use variables in the template it throws |
BTW on this note, is there a way to do raw query with plain old string literal in kysely? |
Some engines don't support any parameters in DDL, or in some queries. Try using
Check |
Currently executing raw queries has the following structure
It would be nice to have it the other way around as well as people naturally tend to think with the current instance first.
or
The text was updated successfully, but these errors were encountered: