Skip to content

Adds ability to escape identifiers w/ tests#216

Merged
ahmad-moussawi merged 3 commits intosqlkata:masterfrom
joshcobalt:sqlkata#215
Mar 20, 2019
Merged

Adds ability to escape identifiers w/ tests#216
ahmad-moussawi merged 3 commits intosqlkata:masterfrom
joshcobalt:sqlkata#215

Conversation

@joshcobalt
Copy link
Copy Markdown
Contributor

Here is a commit to allow for escaping identifiers #215

Copy link
Copy Markdown
Contributor

@ahmad-moussawi ahmad-moussawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR!, why checking for the opening bracket ( in the regex?

@joshcobalt
Copy link
Copy Markdown
Contributor Author

It's not looking for the paren, it's just part of the matching group.

"Zero-width negative lookbehind. Look behind the current position to determine whether subexpression does not match the input string."
https://docs.microsoft.com/en-us/dotnet/standard/base-types/best-practices#take-charge-of-backtracking

I'd also like to apply the escape behavior to the Compiler.WrapValue() method, but I'm trying to determine a clean way of accomplishing that -- any ideas?

@joshcobalt
Copy link
Copy Markdown
Contributor Author

I added some more tests and tweaked the regex, I feel like this is now complete.

@ahmad-moussawi ahmad-moussawi merged commit 37ca8d5 into sqlkata:master Mar 20, 2019
@ahmad-moussawi
Copy link
Copy Markdown
Contributor

Merged with the master branch, thanks!

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