camshaft quote_columns
This commit is contained in:
@@ -179,6 +179,16 @@ AnalysisMapConfigAdapter.prototype.getMapConfig = function (user, requestMapConf
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function stripQuotes(columnName) {
|
||||
const quotedName = columnName.length > 2 && columnName[0] === '"' && columnName[columnName.length - 1] === '"';
|
||||
if (quotedName)
|
||||
{
|
||||
return columnName.substring(1, columnName.length - 1);
|
||||
}
|
||||
return columnName;
|
||||
}
|
||||
|
||||
var SKIP_COLUMNS = {
|
||||
the_geom: true,
|
||||
the_geom_webmercator: true
|
||||
@@ -186,7 +196,7 @@ var SKIP_COLUMNS = {
|
||||
|
||||
function skipColumns (columnNames) {
|
||||
return columnNames
|
||||
.filter(function (columnName) { return !SKIP_COLUMNS[columnName]; });
|
||||
.filter(function (columnName) { return !SKIP_COLUMNS[stripQuotes(columnName)]; });
|
||||
}
|
||||
|
||||
var wrappedQueryTpl = dot.template([
|
||||
|
||||
Reference in New Issue
Block a user