Skip to content
Snippets Groups Projects
Commit 31eefde2 authored by Rafael Dias's avatar Rafael Dias
Browse files

Issue #112: Update SELECT


Signed-off-by: default avatarrafaelcosc <rpd17@inf.ufpr.br>
parent ac597977
No related branches found
No related tags found
No related merge requests found
Pipeline #21491 failed
...@@ -121,7 +121,22 @@ export abstract class SQLAdapter extends Adapter { ...@@ -121,7 +121,22 @@ export abstract class SQLAdapter extends Adapter {
sort = " ORDER BY " + order; 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) {
attributes = dimensions + "," + metrics;
}else{
attributes = dimensions;
}
return withClause + "SELECT " + attributes + " FROM " + view.name + sort + ";";
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment