Fix inconsistent behaviour of feature version filter when using the CLI #188
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.
The feature version filter behaves differently for different CLI commands. To reproduce the following examples, load a small dataset into an empty database and terminate all features right afterwards.
export -H localhost -u user -p password -d db -o test.gml
When doing a CityGML export from the database with the above command, no features will be exported because the
command only works on non-terminated features by default.
export -H localhost -u user -p password -d db -o test.gml -t Building
When changing the command by adding a filter (like the feature type filter above), the behaviour changes. The command
does not use a default feature version filter anymore and, thus, all buildings are exported. If you only want to export non-
terminated features in this case, you must explicitly add
-r latest
.export-vis -H localhost -u user -p password -d db -o test.kml -D collada -l halod
A simple visualization export behaves like the first CityGML export example. Only non-terminated feature get exported.
export-vis -H localhost -u user -p password -d db -o test.kml -D collada -l halod -t Building
Adding another filter does not change the behaviour - again only non-terminated features are exported. Thus,
export
andexport-vis
behave differently.Note that the
delete
command behaves like theexport
command. The different behaviours of the commands are at least unexpected. This PR proposes that all commands should behave the same and use a default feature version filter for non-terminated features.