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

Added regex for string substitution in transactions #21

Merged
merged 2 commits into from
Apr 30, 2017

Conversation

JoeyBoolean
Copy link

This fixes an issue when creating a transaction with bind variables. If a query was written like this
UPSERT {name: @name} ...
The query would be translated to
UPSERT {name: ${name} ...
instead of
UPSERT {name: ${name}} ...
This PR fixes that issue and creates a test for that case.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 83.986% when pulling d60252d on JoeyBoolean:v2.0.0 into e537a69 on solher:v2.0.0.

@solher solher merged commit feee20c into solher:v2.0.0 Apr 30, 2017
@solher
Copy link
Owner

solher commented Apr 30, 2017

Thank you! I initially did it the hard way for performance reasons but I rebenchmarked it and it seems reasonable. I just put the regex compilation outside of the method. This would be a very costly operation at runtime.

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.

3 participants