Skip to content

Commit 09b15e4

Browse files
committed
chore: hotfix support quoted alias: multiple alias and orderby support.
1 parent 088e17b commit 09b15e4

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
1.2.2 feat: add support for "`" quoted alias, pr: #33
1010
1.3.0 fix tableFactor alias bug. AST changed in tableFactor. #34
1111
1.4.0 fix bug `using ' & " for column alias?` #40 #44
12+
1.4.1 hogfix "support quoted alias: multiple alias and orderby support"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sql grammar follows https://dev.mysql.com/doc/refman/5.7/en/select.html
1010

1111
## news
1212

13-
- Fix bug `using ' & " for column alias?` since v1.4.0 [#40](https://github.com/JavaScriptor/js-sql-parser/issues/40), [#44](https://github.com/JavaScriptor/js-sql-parser/issues/44)
13+
- Fix bug `using ' & " for column alias?` since v1.4.1 [#40](https://github.com/JavaScriptor/js-sql-parser/issues/40), [#44](https://github.com/JavaScriptor/js-sql-parser/issues/44)
1414
- Fix bug tableFactor alias since v1.3.0 [#34](https://github.com/JavaScriptor/js-sql-parser/issues/34)
1515
- Add support for "`" quoted alias since v1.2.2. [#33](https://github.com/JavaScriptor/js-sql-parser/issues/33)
1616
- Fix bug stringify keyword `having` since v1.2.1. [#29](https://github.com/JavaScriptor/js-sql-parser/issues/29)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-sql-parser",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "",
55
"main": "./dist/parser/sqlParser.js",
66
"scripts": {

src/sqlParser.jison

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ UNION return 'UNION'
128128
\. return 'DOT'
129129
["][a-zA-Z_\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*["] return 'STRING'
130130
['][a-zA-Z_\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*['] return 'STRING'
131-
[`].+[`] return 'IDENTIFIER'
131+
([`])(?:(?=(\\?))\2.)*?\1 return 'IDENTIFIER'
132132

133133
<<EOF>> return 'EOF'
134134
. return 'INVALID'

test/main.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ describe('select grammar support', function () {
428428
testParser('select a as \'"A#A\' from z order by \'"A#A\' desc');
429429
});
430430

431-
it.only('test IDENTIFIER', function () {
431+
it('test IDENTIFIER', function () {
432432
testParser('select `aa#sfs`(a) as \'A A\' from z');
433433
});
434434
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy