effect icon indicating copy to clipboard operation
effect copied to clipboard

Pass parameters to SQL query string in @effect/sql

Open nounder opened this issue 4 months ago • 0 comments

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 avatar Oct 02 '24 14:10 nounder