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

Pass parameters to SQL query string in @effect/sql #3719

Open
nounder opened this issue Oct 2, 2024 · 0 comments
Open

Pass parameters to SQL query string in @effect/sql #3719

nounder opened this issue Oct 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nounder
Copy link

nounder commented Oct 2, 2024

What is the problem this feature would solve?

Querying raw SQL strings that contains standard SQL parameters (@k, $1, :k)

What is the feature you are proposing to solve the problem?

Add exec(sql: string, params: Segment[] | Record<string, Segment>) method to SqlClient.

What alternatives have you considered?

Calling database library directly and preparing statement by hand before sending them (applicable to SQLite clients like better-sqlite3, Bun built-in client, and upcoming Node's client)

@nounder nounder added the enhancement New feature or request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant