After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747849 - Want transactional operation that removes multiple resources
Want transactional operation that removes multiple resources
Status: RESOLVED FIXED
Product: gom
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-14 13:51 UTC by Alexander Larsson
Modified: 2015-04-14 14:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gom: Ensure we update ids when saving a resource group (7.67 KB, patch)
2015-04-14 13:52 UTC, Alexander Larsson
accepted-commit_now Details | Review
gom: Add gom_resource_group_delete_[a]sync functions (8.70 KB, patch)
2015-04-14 13:52 UTC, Alexander Larsson
accepted-commit_now Details | Review

Description Alexander Larsson 2015-04-14 13:51:20 UTC
Got a patchset ready.
Comment 1 Alexander Larsson 2015-04-14 13:52:35 UTC
Created attachment 301545 [details] [review]
gom: Ensure we update ids when saving a resource group

We move the freeing of the items to the destruction of the asyncresult
and then we iterate over all items calling gom_resource_set_post_save_properties
on a successfull operation.

This also updates test-gom-stress to ensure we're getting the right ids
when calling gom_resource_group_write_sync().
Comment 2 Alexander Larsson 2015-04-14 13:52:40 UTC
Created attachment 301546 [details] [review]
gom: Add gom_resource_group_delete_[a]sync functions

These are for deleting a group of objects as a transaction.
Comment 3 Bastien Nocera 2015-04-14 14:26:23 UTC
Review of attachment 301545 [details] [review]:

Looks good.
Comment 4 Bastien Nocera 2015-04-14 14:29:02 UTC
Review of attachment 301546 [details] [review]:

Looks good otherwise.

::: tests/test-gom-stress.c
@@ +315,3 @@
    g_free(s2);
 
+   group = gom_resource_group_new(repository);

Can you add the same test to stress1() and a note of what it does as a comment?
Comment 5 Alexander Larsson 2015-04-14 14:49:35 UTC
Attachment 301545 [details] pushed as 67d7663 - gom: Ensure we update ids when saving a resource group
Attachment 301546 [details] pushed as 9fe1ed8 - gom: Add gom_resource_group_delete_[a]sync functions