mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add method OracleUtils.isBultinTable
This commit is contained in:
@@ -183,4 +183,24 @@ public class OracleUtils {
|
||||
|
||||
return functions.contains(function_lower);
|
||||
}
|
||||
|
||||
private static Set<String> builtinTables;
|
||||
|
||||
public static boolean isBuiltinTable(String table) {
|
||||
if (table == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String table_lower = table.toLowerCase();
|
||||
|
||||
Set<String> tables = builtinTables;
|
||||
|
||||
if (tables == null) {
|
||||
tables = new HashSet<String>();
|
||||
Utils.loadFromFile("META-INF/druid/parser/oracle/builtin_tables", tables);
|
||||
builtinTables = tables;
|
||||
}
|
||||
|
||||
return tables.contains(table_lower);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user