|
|
|
@ -118,7 +118,7 @@ function replace_table_in_query (sql, old_table_name, replacement) {
|
|
|
|
|
// since the pattern matches the first character of the table
|
|
|
|
|
// it must be put back in the replacement text
|
|
|
|
|
replacement = '$01' + replacement;
|
|
|
|
|
return '([^\.a-z0-9_]|^)';
|
|
|
|
|
return '([^\.a-z0-9_]|^)'; // eslint-disable-line no-useless-escape
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -299,8 +299,7 @@ function should_use_overviews (query, data) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function is_supported_query (sql) {
|
|
|
|
|
var basic_query =
|
|
|
|
|
/\s*SELECT\s+[\*a-z0-9_,\s]+?\s+FROM\s+((\"[^"]+\"|[a-z0-9_]+)\.)?(\"[^"]+\"|[a-z0-9_]+)\s*;?\s*/i;
|
|
|
|
|
var basic_query = /\s*SELECT\s+[\*a-z0-9_,\s]+?\s+FROM\s+((\"[^"]+\"|[a-z0-9_]+)\.)?(\"[^"]+\"|[a-z0-9_]+)\s*;?\s*/i; // eslint-disable-line no-useless-escape
|
|
|
|
|
var unwrapped_query = new RegExp('^' + basic_query.source + '$', 'i');
|
|
|
|
|
// queries for named maps are wrapped like this:
|
|
|
|
|
var wrapped_query = new RegExp(
|
|
|
|
|