You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
77570a9 merges the two existing implementations of the select: one exists for the GpfGetFeatures codepath and another for GpfGetFeatureById, while they should be identical.
d74b22b renames attachFeatureRefs into postProcessFeatureCollection to more accurately reflect that this function handles all the post-processing, and does not only attach feature refs anymore.
The default parameter geometryProperty = getGeometryProperty(featureType) is evaluated whenever the argument is not provided, even when the geometry is not needed (no select, no spatial_extras). Yet getGeometryProperty throws on a type without any geometry property.
Consequence: a bare gpf_get_feature_by_id on wfs_scot:doc_urba or wfs_scot:doc_urba_com (the 2 geometry-less types in the embedded catalog) now fails before even issuing the WFS request, whereas it worked on main. The old buildPropertyName in byId.ts only resolved the geometry when necessary — that was the invariant documented by the comment removed along with the function.
Thank you for catching that regression! Addressed and tested in 25871c3
Additionally, when doing a GetFeatureById with empty select and spatial_extra, the query used to have an empty propertyName, which implies fetching the entire geometry, and then discarding it (and replacing it will null). The refactor already changed that, and the latest commit tests this case. It also add tests for the case of collection without geometries, like wfs_scot:doc_urba.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codefixFix a small aspect of the coderefactoringRethink code architecture
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix two code inconsistencies:
select: one exists for the GpfGetFeatures codepath and another for GpfGetFeatureById, while they should be identical.attachFeatureRefsintopostProcessFeatureCollectionto more accurately reflect that this function handles all the post-processing, and does not only attach feature refs anymore.Pure refactors, no impact on behavior.