Поправил функцию getColN(name) для поиска данных по названию колонки.

This commit is contained in:
Igor I
2024-01-25 17:00:47 +06:00
parent 7797b141bf
commit eca2e4f45f
3 changed files with 10 additions and 9 deletions

View File

@ -1462,10 +1462,11 @@ class SRec
}
}
//Get column number by name
//Get column number by name, if result=-1 then not find else find
getColN(name){
let i=-1;
let result=-1;
//determine the sequence number of the column
let pos=0;
let node=findNodeOnPath(this.nodeMetadata,"type/objects-list");
let nodeCol = node.firstChild;
while (nodeCol != null)
@ -1473,13 +1474,14 @@ class SRec
if(nodeCol.nodeName=="column")
{
if(nodeCol.getAttribute("n")==name){
result=pos;
break;
}
i++;
pos++;
}
nodeCol = nodeCol.nextSibling;
}
return i;
return result;
}
//find the value in the result set by the id of the record and the name of the column