Skip to content
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

Ensure fields to be consistent after editing #45

Merged
merged 15 commits into from
Jul 21, 2021
Merged

Ensure fields to be consistent after editing #45

merged 15 commits into from
Jul 21, 2021

Conversation

minff
Copy link
Contributor

@minff minff commented Jul 21, 2021

  • Ensure xyz_id uniqueness via sqlite trigger instead of 'on replace conflict' constraint
  • Ensure fields to be consistent with provider fields to avoid data corruption, especially after editing
    • map_fields, feat.fields
  • Ensure the paired order of fields-vector layer after a layer is removed (set fields to empty for deleted layer)
  • Handle virtual fields (expression field) in data loading
  • Update test for parser and render
  • Disconnect signal silently to avoid exception

minff added 15 commits July 15, 2021 03:52
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
Signed-off-by: minff <16268924+minff@users.noreply.github.com>
+ selecting order:
 * score >= threshold
 * score == -1 (empty fields)
 * score < threshold (create new fields)
+ applied to case: deleted layer reset QgsFields to empty

Signed-off-by: minff <16268924+minff@users.noreply.github.com>
+ filter virtual field out of fields may cause feature attributes order to corrupt
+ provider_fields is assumed to be equals to new_fields (=old provider_fields + diff_fields)
+ TODO: update fields of feature from new_fields to merged provider_fields if previous assumption not met

Signed-off-by: minff <16268924+minff@users.noreply.github.com>
…specially after creating features

Signed-off-by: minff <16268924+minff@users.noreply.github.com>
+ avoid data corruption due to misaligned fields order

Signed-off-by: minff <16268924+minff@users.noreply.github.com>
+ on conflict replace does not work after create/delete column in edit mode (commit error)

Signed-off-by: minff <16268924+minff@users.noreply.github.com>
@minff minff merged commit e6ebc23 into master Jul 21, 2021
@minff minff deleted the fix-field branch July 21, 2021 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant