PR style fixes
This commit is contained in:
@@ -18,7 +18,7 @@ class VectorMapConfigAdapter {
|
||||
return callback(null, requestMapConfig);
|
||||
}
|
||||
|
||||
if (requestMapConfig.layers.lenght > 1) {
|
||||
if (requestMapConfig.layers.length > 1) {
|
||||
return callback(new Error('Get column types for multiple vector layers is not implemented'));
|
||||
}
|
||||
|
||||
@@ -43,11 +43,10 @@ class VectorMapConfigAdapter {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
const query = `SELECT * FROM (${originalQuery}) _cdb_column_type limit 0`;
|
||||
const query = queryUtils.getQueryLimited(originalQuery, 0);
|
||||
queryUtils.queryPromise(connection, query)
|
||||
.then(resolve)
|
||||
.catch(reject);
|
||||
// TODO release pgConnection
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function _isDateType(field) {
|
||||
* @param {string} column - The name of the date column
|
||||
*/
|
||||
function _castColumnToEpoch(columnName) {
|
||||
return `date_part('epoch', ${columnName}) as ${columnName}`;
|
||||
return `date_part('epoch', ${columnName}) as "${columnName}"`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user