public static boolean isReservedWord ( Dialect dialect , String word ) { if ( ! isReservedWord ( word ) ) return false ; String fitDatabases = RESERVED_WORDS . get ( word . toUpperCase ( ) ) . toUpperCase ( ) ; if ( fitDatabases . contains ( "ANSI" ) ) return true ; String dia = dialect . toString ( ) . replace ( "Dialect" , "" ) . toUpperCase ( ) ; if ( dia . length ( ) >= 4 ) dia = dia . substring ( 0 , 4 ) ; // only compare first 4 letters return ( fitDatabases . contains ( dia ) ) ; }
Check if is a dialect reserved word of ANSI - SQL reserved word