The PR addresses a deficiency in current code base that prevents ability to query on OBJECTID in the where parameter when OBJECTIDs are generated on-the-fly in Winnow.
Context:
If data arrives in winnow without an OBJECTID field and no alternative assignment using the metadata.idField property, then winnow generates an OBJECTID on-the-fly in a user-defined SELECT function that is passed into alasql. However, problems occur if the where parameter queries OBJECTID, e.g., where=OBJECTID=1234, because the OBJECTID does not yet exist on the data when the alasql WHERE does its filtering. Thus, no features are ever returned.
Solution:
If the WHERE includes predicates with OBJECTID, but no OBJECTID is defined on the data, and no idField has been assigned, we have to use a user-defined function in the WHERE part of alasql to generate an on-the-fly OBJECTID for comparison to the submitted value.
The PR addresses a deficiency in current code base that prevents ability to query on OBJECTID in the
where
parameter when OBJECTIDs are generated on-the-fly in Winnow.Context: If data arrives in winnow without an OBJECTID field and no alternative assignment using the
metadata.idField
property, then winnow generates an OBJECTID on-the-fly in a user-definedSELECT
function that is passed into alasql. However, problems occur if thewhere
parameter queries OBJECTID, e.g.,where=OBJECTID=1234
, because the OBJECTID does not yet exist on the data when the alasqlWHERE
does its filtering. Thus, no features are ever returned.Solution: If the WHERE includes predicates with OBJECTID, but no OBJECTID is defined on the data, and no
idField
has been assigned, we have to use a user-defined function in theWHERE
part of alasql to generate an on-the-fly OBJECTID for comparison to the submitted value.