@@ -42,7 +42,8 @@ const messages = {
4242 unresolvedDynamicVar : 'Unresolved dynamic variable' ,
4343 replacedWith : '→ replaced with' ,
4444 unresolvedVar : 'Unresolved variable' ,
45- emptyString : '→ replaced with empty string'
45+ emptyString : '(empty string)' ,
46+ nullValue : '(no match)'
4647 } ,
4748 kr : {
4849 dynamicVarSet : '동적 변수 설정:' ,
@@ -80,7 +81,8 @@ const messages = {
8081 unresolvedVars : '치환되지 않은 변수들:' ,
8182 unresolvedDynamicVar : '치환되지 않은 동적 변수' ,
8283 replacedWith : '→' ,
83- emptyString : '로 대체' ,
84+ emptyString : '(빈 문자열)' ,
85+ nullValue : '(매칭 없음)' ,
8486 unresolvedVar : '치환되지 않은 변수'
8587 }
8688} ;
@@ -394,17 +396,17 @@ class VariableProcessor {
394396 const fullMatch = match [ 0 ] ;
395397 const varName = match [ 1 ] ;
396398
397- // 동적 변수의 경우 빈 배열로 대체
399+ // 동적 변수의 경우 NULL로 대체 (IN 절에서 숫자/문자열 타입 모두 안전)
398400 if ( this . dynamicVariables . hasOwnProperty ( varName . split ( '.' ) [ 0 ] ) ) {
399- result = result . replace ( fullMatch , "'^-_' " ) ;
401+ result = result . replace ( fullMatch , "NULL " ) ;
400402 if ( debugVariables ) {
401- console . log ( `${ this . msg . unresolvedDynamicVar } [${ varName } ] ${ this . msg . replacedWith } '^-_' ${ this . msg . emptyString } ` ) ;
403+ console . log ( `${ this . msg . unresolvedDynamicVar } [${ varName } ] ${ this . msg . replacedWith } NULL ${ this . msg . nullValue } ` ) ;
402404 }
403405 } else {
404406 // 일반 변수의 경우 빈 문자열로 대체
405407 result = result . replace ( fullMatch , "''" ) ;
406408 if ( debugVariables ) {
407- console . log ( `${ this . msg . unresolvedVar } [${ varName } ] ${ this . msg . replacedWith } ''${ this . msg . emptyString } ` ) ;
409+ console . log ( `${ this . msg . unresolvedVar } [${ varName } ] ${ this . msg . replacedWith } '' ${ this . msg . emptyString } ` ) ;
408410 }
409411 }
410412 } ) ;
0 commit comments