protected SQLDataType parseCharTypeRest(SQLDataType dataType) {
if (!isCharType(dataType)) {
return dataType;
}
SQLCharactorDataType charType = new SQLCharactorDataType(dataType.getName());
charType.getArguments().addAll(dataType.getArguments());
if (identifierEquals("CHARACTER")) {
lexer.nextToken();
accept(Token.SET);
if (lexer.token() != Token.IDENTIFIER) {
throw new ParserException();
}
charType.setCharSetName(lexer.stringVal());
lexer.nextToken();
if (lexer.token() == Token.IDENTIFIER) {
if (lexer.stringVal().equalsIgnoreCase("COLLATE")) {
lexer.nextToken();
if (lexer.token() != Token.IDENTIFIER) {
throw new ParserException();
}
charType.setCollate(lexer.stringVal());
lexer.nextToken();
}
}
}
return charType;