-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Allow quoting identifiers #588
base: master
Are you sure you want to change the base?
Allow quoting identifiers #588
Conversation
If you wrap your quoted identifiers in your raw expressions with |
The documentation state that square brackets ( The current PR adds the ability to quote in non- |
Interesting. I am using |
I found where I read that you can use
So you should probably handle both in your PR. |
It's not clear for me why quoting in non raw methods is needed? |
Sorry for my belated response... Addressing your question Ahmed, indeed it is not needed to quote identifiers in the non-raw methods, but why not support them? To give some more context and an actual use-case, I wrote a small abstraction over your beautiful library which translates classes and constructs a SqlKata query with Selects/Wheres etc, due to the nature of possible filters (or transformations ( This PR aims to simplify and allow consumers of the library to pass pre-quoted identifiers and not worry about getting triple quoted identifiers out as does it simplify the need of the consumer to manually quote non-raw identifiers with the concrete quotation character (i.e. the consumer passes the values to the compiler and doesn't have to worry whether to quote non-raw identifiers with double quotes ( |
Currently, SqlKata allows consumers to quote identifiers only within
?Raw
methods.Due to that when working with identifiers which need to be quoted (whether being keywords or due to casing) separate logic needs to be implemented when calling a non-
Raw
vs aRaw
method.This PR allows any identifier to be quoted within the non-
Raw
methods as well.