Hi,

It is me again with an interesting thing, I've searched the net, this group 
etc. Not a lot of people seem interested in append_result, I AM!!

I am looking for a way to implement the following:


I have many tables, a lot with polymorphic inheritance and self and cross 
references.

In order to control "available" data I have set up a system similar to ACL 
(Access Control Lists)

Depending on "Who I am" I can get data from the database.

I want to do so within the MapperExtension I already have set up to do some 
"before update" and "before insert"


    def append_result(self, mapper, selectcontext, row, instance, result, 
**flags):
        if instance.__tablename__ == 'he':
            return EXT_STOP
        else:
            return EXT_CONTINUE

would do such a thing, but I want (for the sake of the code behind that) to 
continue with a heavily modified instance.

To avoid making this long code (a lot of different object types pass through 
here, remember the polymorhic bit)

Does anyone have an interesting approach to this? basically I need to do 
something like instance= instance_class_type(new, configuration, based, on, 
the, ACL)



Any help would be wonderfull,

Martijn








-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to