Skip to content
Snippets Groups Projects
Commit 07fc46a7 authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira
Browse files

Merge branch 'issue/112' into 'develop'

Issue #112: Fix SELECT all

See merge request !92
parents ac597977 07104416
No related branches found
No related tags found
1 merge request!92Issue #112: Fix SELECT all
Pipeline #31021 failed
......@@ -121,7 +121,30 @@ export abstract class SQLAdapter extends Adapter {
sort = " ORDER BY " + order;
}
return withClause + "SELECT * FROM " + view.name + sort + ";";
const dimensions = view.dimensions.map((item) => {
return "\"" + item.name + "\"";
}).join(",");
const metrics = view.metrics.map((item) => {
return "\"" + item.name + "\"";
}).join(",");
let attributes = "";
if (dimensions.length > 0) {
if (metrics.length > 0) {
attributes = dimensions + "," + metrics;
}
else {
attributes = dimensions;
}
}
else {
attributes = metrics;
}
return withClause + "SELECT " + attributes + " FROM " + view.name + sort + ";";
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment