Skip to content

Commit

Permalink
Refactorings.....
Browse files Browse the repository at this point in the history
  • Loading branch information
demmings committed Jul 7, 2024
1 parent d481cd3 commit 2067b87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dist/gssql.js
Original file line number Diff line number Diff line change
Expand Up @@ -3211,8 +3211,8 @@ class DerivedTable { // skipcq: JS-0128
joinedData.push(this.leftField.tableInfo.tableData[i].concat(emptyRightRow));
}
else {
for (let j = 0; j < this.leftRecords[i].length; j++) {
joinedData.push(this.leftField.tableInfo.tableData[i].concat(this.rightField.tableInfo.tableData[this.leftRecords[i][j]]));
for (const rec of this.leftRecords[i]) {
joinedData.push(this.leftField.tableInfo.tableData[i].concat(this.rightField.tableInfo.tableData[rec]));
}
}
}
Expand Down Expand Up @@ -3437,7 +3437,7 @@ class SqlServerFunctions {
* @returns {String}
*/
instr(parms) { // skipcq: JS-0105
return SqlServerFunctions.locate(parms.reverse());
return SqlServerFunctions.locate(parms.toReversed());
}

/**
Expand Down Expand Up @@ -4074,7 +4074,7 @@ class ConglomerateRecord {
* @returns {String}
*/
static replaceFieldNames(calcFunc, mappedField) {
mappedField.forEach(item => calcFunc = calcFunc.replaceAll(item.oldName, item.newName));
mappedField.forEach(item => (calcFunc = calcFunc.replaceAll(item.oldName, item.newName)));

return calcFunc;
}
Expand Down Expand Up @@ -7763,7 +7763,7 @@ class Select2Object { // skipcq: JS-0128
static getColumnNumber(object, columnTitle) {
const prop = Select2Object.convertColumnTitleToPropertyName([columnTitle])[0];
let col = 1;
for (const propName in object) {
for (const propName in object) { // skipcq: JS-0051
if (propName === prop) {
return col;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Select2Object.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class Select2Object { // skipcq: JS-0128
static getColumnNumber(object, columnTitle) {
const prop = Select2Object.convertColumnTitleToPropertyName([columnTitle])[0];
let col = 1;
for (const propName in object) {
for (const propName in object) { // skipcq: JS-0051
if (propName === prop) {
return col;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Views.js
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,8 @@ class DerivedTable { // skipcq: JS-0128
joinedData.push(this.leftField.tableInfo.tableData[i].concat(emptyRightRow));
}
else {
for (let j = 0; j < this.leftRecords[i].length; j++) {
joinedData.push(this.leftField.tableInfo.tableData[i].concat(this.rightField.tableInfo.tableData[this.leftRecords[i][j]]));
for (const rec of this.leftRecords[i]) {
joinedData.push(this.leftField.tableInfo.tableData[i].concat(this.rightField.tableInfo.tableData[rec]));
}
}
}
Expand Down Expand Up @@ -1679,7 +1679,7 @@ class SqlServerFunctions {
* @returns {String}
*/
instr(parms) { // skipcq: JS-0105
return SqlServerFunctions.locate(parms.reverse());
return SqlServerFunctions.locate(parms.toReversed());
}

/**
Expand Down Expand Up @@ -2316,7 +2316,7 @@ class ConglomerateRecord {
* @returns {String}
*/
static replaceFieldNames(calcFunc, mappedField) {
mappedField.forEach(item => calcFunc = calcFunc.replaceAll(item.oldName, item.newName));
mappedField.forEach(item => (calcFunc = calcFunc.replaceAll(item.oldName, item.newName)));

return calcFunc;
}
Expand Down

0 comments on commit 2067b87

Please sign in to comment.