File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ export const plsql: DialectOptions = {
107107 identChars : { rest : '$#' } ,
108108 variableTypes : [ { regex : '&{1,2}[A-Za-z][A-Za-z0-9_$#]*' } ] ,
109109 paramTypes : { numbered : [ ':' ] , named : [ ':' ] } ,
110- paramChars : { } , // Empty object used on purpose to not allow $ and # chars as specified in identChars
111110 operators : [
112111 '**' ,
113112 ':=' ,
Original file line number Diff line number Diff line change @@ -84,11 +84,13 @@ describe('PlSqlFormatter', () => {
8484 ` ) ;
8585 } ) ;
8686
87- // Parameters don't allow the same characters as identifiers
88- it ( 'does not support #, $ in named parameters' , ( ) => {
89- expect ( ( ) => format ( 'SELECT :col$foo' ) ) . toThrowError ( `Parse error: Unexpected "$foo"` ) ;
90-
91- expect ( ( ) => format ( 'SELECT :col#foo' ) ) . toThrowError ( `Parse error: Unexpected "#foo"` ) ;
87+ // Issue #822
88+ it ( 'supports #, $ in named parameters' , ( ) => {
89+ expect ( format ( 'SELECT :col$foo, :col#foo' ) ) . toBe ( dedent `
90+ SELECT
91+ :col$foo,
92+ :col#foo
93+ ` ) ;
9294 } ) ;
9395
9496 it ( 'supports &name substitution variables' , ( ) => {
You can’t perform that action at this time.
0 commit comments