-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bugfix] Filter by polygon: table could be a query #98
Conversation
I was curious how the tests could pass. If the code is not really tested before the PR, please specify it, otherwise, we were going to make some 500 errors if merged too quickly.
I want to check how CI could be OK, and also other checks on this PR later |
I think there is no tests to check build sql. |
4f54638
to
6509fca
Compare
I have updated the code and added a test. |
6509fca
to
99848e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Perfect, no code duplication, single static
or class
method, which is unit-testable ;-)
isEmpty, startsWith, endsWith are QString methods not python string ones
While QString
belongs to the QtCore package, it does not exist in Python. It's absolutely not possible to have a QString object in PyQt.
from qgis.PyQt.QtCore import QString
Traceback (most recent call last):
File "/usr/lib/python3.12/code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
ImportError: cannot import name 'QString' from 'qgis.PyQt.QtCore' (/usr/lib/python3/dist-packages/qgis/PyQt/QtCore.py)
I found the same information after your review. Thanks to point it. |
The layer filtered by polygon could be a query `_features_ids_with_sql_query` The polygon layer could be a query `_polygon_for_groups_with_sql_query`
99848e2
to
e5bd3e1
Compare
The layer filtered by polygon could be a query
_features_ids_with_sql_query
The polygon layer could be a query
_polygon_for_groups_with_sql_query