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

Support named parameter replacement #23

Merged
merged 2 commits into from
Aug 9, 2022
Merged

Support named parameter replacement #23

merged 2 commits into from
Aug 9, 2022

Conversation

dgraham
Copy link
Member

@dgraham dgraham commented Aug 9, 2022

Provide an object with replacement parameter values to be substituted for names beginning with a colon.

conn.execute('select 1 from dual where 1=:id', { id: 42 })
// => select 1 form dual where 1=42

Provide an object with replacement parameter values to be substituted
for names beginning with a colon.

```js
conn.execute('select 1 from dual where 1=:id', { id: 42 })
// => select 1 form dual where 1=42
```
@dgraham dgraham requested a review from iheanyi August 9, 2022 16:08
Replace only known parameter names so colon syntax operators like `:=`
are not replaced.
@dgraham dgraham merged commit 75d91cb into main Aug 9, 2022
@dgraham dgraham deleted the named-parameters branch August 9, 2022 16:45
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.

2 participants