Skip to content

Commit bc6c825

Browse files
committed
Add WITH keyword
1 parent 14cdd08 commit bc6c825

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

keywords.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const KEYWORDS = [
116116
'TO',
117117
'TRUE',
118118
'WHEN',
119+
'WITH',
119120
'UNSIGNED',
120121
'CASCADE',
121122
'ENGINE',

test/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ console.log(highlight('select "users".* from "users" where ("username" = \'test\
1212
console.log(highlight("SELECT COUNT(id), COUNT(id), `id`, `username` FROM `users` WHERE `email` = '[email protected]' AND `something` = 'oke-doke' AND true = true"))
1313
console.log(highlight("SELECT COUNT(id), `id`, `username` FROM `users` WHERE `email` = '[email protected]' AND (username in ( SELECT \"name\" from aTable)", { html: false }))
1414
console.log(highlight('SELECT id FROM users'))
15+
16+
console.log(highlight('WITH t1 AS (SELECT data_point FROM tablename) SELECT data_point FROM t1;'))

0 commit comments

Comments
 (0)