Feature Request to be Discussed: Add Repligard Table to the API
-
Ala-Louvesniemi, Jarkko
Feature Request to be Discussed: Add Repligard Table to the API
Mon August 09 2010 13:25:08 UTCPiotras brought this up because there's a need to get class by guid and this would solve it in a generic way: This would also satisfy other repligard table related feature request (like checking if an object once existed with given guid or if object is marked as deleted instead of not existing at all etc.).
What would you say about this:
$entry = new midgard_repligard($guid);
$classname = $entry->typename;
$qb = new midgard_query_builder("midgard_repligard");
$qb->add_constraint ("action", "=", "purge");
foreach ($qb->execute() as $entry) {
$entry->delete();
}
No "purge" action seems to exist in Ragnaroek but Piotras mentioned it (as constant OBJECT_PURGED though) so perhaps Midgard2/3 has it...
Obviously this would be added to trunk but I need this (the get class by guid use case) in Ragnaroek too.
The main use case would be to get class by guid or to check if object exists as metadata_deleted=1 and other read only tasks. But write access could also be possible (though I'd make it to allow only operations which operate on rows which don't point to existing objects because otherwise get_object_by_guid() would broke - e.g. if there are orphan rows or if indeed there is a "purge" action such rows can of course be deleted because they don't point to existing objects - I see metadata_deleted=1 in this case as an existing object).
No ticket exists yet for this. Piotras said we should first discuss this and see what we want first.
--
jval
_______________________________________________
dev mailing list
dev@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/dev
