FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add support for quoted alias by eortiz-tracktik · Pull Request #33 · JavaScriptor/js-sql-parser · GitHub

feat: add support for quoted alias - #33

Merged
albin3 merged 1 commit into
JavaScriptor:masterfrom
TrackTik:master
Mar 30, 2020
Merged

feat: add support for quoted alias#33
albin3 merged 1 commit into
JavaScriptor:masterfrom
TrackTik:master

Conversation

Copy link
Copy Markdown
Contributor

We are using this parser and we would like to be able to use quoted alias like on the tests.
Basically, anything quoted should be safe as a quoted identifier?

Thanks.

albin3 commented Mar 27, 2020

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor Author

@albin3 thanks for the quick response.
We have tried to use it, but is limited to some specific characters and we can't use some of the special characters we have put on the tests.

  it('support quoted alias', function() {
    testParser('select a as `A-A` from b limit 2;');
    testParser('select a as `A#A` from b limit 2;');
    testParser('select a as `A?A` from b limit 2;');
    testParser('select a as `A/B` from b limit 2;');
    testParser('select a as `A.A` from b limit 2;');
    testParser('select a as `A|A` from b limit 2;');
    testParser('select a as `A A` from b limit 2;');
  });

I saw that there was already the concept of QUOTED_IDENTIFIER but was also limited to certain characters.
I understand why we need to limit the allowed characters on regular identifiers, but if it's quoted I think we don't need to have this restriction.

albin3 merged commit bb66951 into JavaScriptor:master Mar 30, 2020

albin3 commented Mar 30, 2020

Copy link
Copy Markdown
Member

@eortiz-tracktik you are right! thanks for this pr. 😺

albin3 commented Mar 30, 2020

Copy link
Copy Markdown
Member

v1.2.2 has released.

Copy link
Copy Markdown
Contributor Author

Thanks a lot to you @albin3 for this awesome project! 👏

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL