private int onStartEscapeSequence ( String sql , StringBuffer sb , int i ) throws SQLException { sb . setCharAt ( i ++ , ' ' ) ; i = StringUtil . skipSpaces ( sql , i ) ; if ( sql . regionMatches ( true , i , "fn " , 0 , 3 ) || sql . regionMatches ( true , i , "oj " , 0 , 3 ) || sql . regionMatches ( true , i , "ts " , 0 , 3 ) ) { sb . setCharAt ( i ++ , ' ' ) ; sb . setCharAt ( i ++ , ' ' ) ; } else if ( sql . regionMatches ( true , i , "d " , 0 , 2 ) || sql . regionMatches ( true , i , "t " , 0 , 2 ) ) { sb . setCharAt ( i ++ , ' ' ) ; } else if ( sql . regionMatches ( true , i , "call " , 0 , 5 ) ) { i += 4 ; } else if ( sql . regionMatches ( true , i , "?= call " , 0 , 8 ) ) { sb . setCharAt ( i ++ , ' ' ) ; sb . setCharAt ( i ++ , ' ' ) ; i += 5 ; } else if ( sql . regionMatches ( true , i , "escape " , 0 , 7 ) ) { i += 6 ; } else { i -- ; throw Util . sqlException ( Error . error ( ErrorCode . JDBC_CONNECTION_NATIVE_SQL , sql . substring ( i ) ) ) ; } return i ; }
is called from within nativeSQL when the start of an JDBC escape sequence is encountered