Skip to content
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

Raw query with parameters #511

Closed
nicksrandall opened this issue May 22, 2023 · 2 comments · Fixed by #512
Closed

Raw query with parameters #511

nicksrandall opened this issue May 22, 2023 · 2 comments · Fixed by #512
Labels
api Related to library's API enhancement New feature or request

Comments

@nicksrandall
Copy link
Contributor

I'm in the process of migrating an application to use Kysely, and in a few areas, I already have hand-written SQL statements with parameters like:

select * from "person" where first_name between $1 and $2;

NOTE: This is a simple example, in reality, the queries are quite complex.

Is there a way to run a raw query like this with Kysely?

FWIW, the API that I wish existed would be sql.raw(query, ...paramerters);

@nicksrandall
Copy link
Contributor Author

I took a stab at implementing this at #512

@igalklebanov igalklebanov added enhancement New feature or request api Related to library's API labels May 22, 2023
@nicksrandall
Copy link
Contributor Author

@igalklebanov or @koskimas Does kysely follow some release cadence? I need this feature. Any chance you could cut a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants