-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update all attributes in a single transaction #6142
Update all attributes in a single transaction #6142
Conversation
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.
Got a test for this one?
src/core/qgsvectorlayer.h
Outdated
* | ||
* \since QGIS 3.0 | ||
*/ | ||
bool changeAttributeValues( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues = QgsAttributeMap(), bool skeipDefaultValues = false ); |
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.
"skeip" -> skip
src/core/qgsvectorlayer.h
Outdated
* request to the underlying data provider, so it is more efficient to | ||
* explicitly pass an oldValue if it is already available. | ||
* | ||
* If \a skipDefaultValue is set to true, default field values will not |
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.
skipDefaultValues
Oops, missed your test coming soon message :) |
@nyalldawson Thank you for your review! I updated the documentation and added some tests. Waiting for Travis now... |
I'll merge this PR tomorrow if I have no objections in the meantime. |
ce32247
to
e24b6bb
Compare
Description
Update all attributes in one transaction in order to correctly check database constraints.
Fixes https://issues.qgis.org/issues/17869
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and containt sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit