HHH-14667 Skip loading all keywords from the DB when keyword auto-quoting is disabled

This commit is contained in:
Sanne Grinovero 2021-06-09 15:05:19 +01:00 committed by Sanne Grinovero
parent fd35857284
commit c10493435e
1 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,10 @@ public class IdentifierHelperBuilder {
return;
}
//Important optimisation: skip loading all keywords from the DB when autoQuoteKeywords is disabled
if ( autoQuoteKeywords == false ) {
return;
}
this.reservedWords.addAll( parseKeywords( metaData.getSQLKeywords() ) );
}
@ -176,6 +180,10 @@ public class IdentifierHelperBuilder {
}
public void applyReservedWords(Set<String> words) {
//No use when autoQuoteKeywords is disabled
if ( autoQuoteKeywords == false ) {
return;
}
this.reservedWords.addAll( words );
}