Skip to content

Commit e8eb671

Browse files
committed
feat: support minus in db2
1 parent db6ec22 commit e8eb671

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pegjs/db2.pegjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
'LIMIT': true,
5656
'LOW_PRIORITY': true, // for lock table
5757

58+
'MINUS': true,
5859
'NOT': true,
5960
'NULL': true,
6061

@@ -256,6 +257,7 @@ set_op
256257
= u:(KW_UNION / KW_INTERSECT / KW_EXCEPT) __ s:(KW_ALL / KW_DISTINCT)? {
257258
return s ? `${u.toLowerCase()} ${s.toLowerCase()}` : `${u.toLowerCase()}`
258259
}
260+
/ KW_MINUS { return 'minus' }
259261

260262
union_stmt
261263
= head:select_stmt tail:(__ set_op __ select_stmt)* __ ob: order_by_clause? __ l:limit_clause? {
@@ -2299,6 +2301,7 @@ KW_JOIN = "JOIN"i !ident_start
22992301
KW_OUTER = "OUTER"i !ident_start
23002302
KW_OVER = "OVER"i !ident_start
23012303
KW_UNION = "UNION"i !ident_start { return 'UNION'; }
2304+
KW_MINUS = "MINUS"i !ident_start { return 'MINUS'; }
23022305
KW_INTERSECT = "INTERSECT"i !ident_start { return 'INTERSECT'; }
23032306
KW_EXCEPT = "EXCEPT"i !ident_start { return 'EXCEPT'; }
23042307
KW_VALUES = "VALUES"i !ident_start

0 commit comments

Comments
 (0)