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

Execute overloading #236

Merged
merged 2 commits into from
Jul 18, 2024
Merged

Execute overloading #236

merged 2 commits into from
Jul 18, 2024

Conversation

notrab
Copy link
Member

@notrab notrab commented Jul 5, 2024

Fixes #235

@penberg @giovannibenussi what if we did something like this? It retains the existing behaviour, while allowing for additional argument InArgs:

client.execute({ sql: "SELECT * FROM users WHERE id = ?", args: [1] })

client.execute("SELECT * FROM users WHERE id = ?", [1])

client.execute("SELECT * FROM users")

I haven't refactored, or formatted the files. I didn't seem to find any prettier files.

@penberg penberg merged commit 66d919a into main Jul 18, 2024
2 of 3 checks passed
@penberg penberg deleted the execute-overloading branch July 18, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add execute(sql, args)-style API
2 participants