Поправил функцию getColN(name) для поиска данных по названию колонки.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user