Commit 04565d49 by Hugo Häggmark Committed by GitHub

Templating: Speeds up certain variable queries for Postgres, MySql and MSSql (#28686)

parent 5b1dbe0b
......@@ -69,14 +69,13 @@ export default class ResponseParser {
for (let i = 0; i < rows.length; i++) {
for (let j = 0; j < rows[i].length; j++) {
const value = rows[i][j];
if (res.indexOf(value) === -1) {
res.push(value);
}
res.push(rows[i][j]);
}
}
return _.map(res, value => {
const unique = Array.from(new Set(res));
return _.map(unique, value => {
return { text: value };
});
}
......
......@@ -90,14 +90,13 @@ export default class ResponseParser {
for (let i = 0; i < rows.length; i++) {
for (let j = 0; j < rows[i].length; j++) {
const value = rows[i][j];
if (res.indexOf(value) === -1) {
res.push(value);
}
res.push(rows[i][j]);
}
}
return _.map(res, value => {
const unique = Array.from(new Set(res));
return _.map(unique, value => {
return { text: value };
});
}
......
......@@ -72,14 +72,13 @@ export default class ResponseParser {
for (let i = 0; i < rows.length; i++) {
for (let j = 0; j < rows[i].length; j++) {
const value = rows[i][j];
if (res.indexOf(value) === -1) {
res.push(value);
}
res.push(rows[i][j]);
}
}
return _.map(res, value => {
const unique = Array.from(new Set(res));
return _.map(unique, value => {
return { text: value };
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment