Hi,

I am working in a notification framework, which saves the dirty, new
and deleted states of Objects in Sessions to an Eventlog.
The code is written as a SessionExtension at the moment.

The design uses the postgres NOTIFY / listen statements, and a table
(event_log) for carrying the per commit information of primary id's
which have changed. I know that this is not sql standard, but many dbs
have some sort of notification capability. So i think a general case
is abstractable from this db agnostic proposal (=pg's NOTIFY).
It is even conceivable to send  the notification through OS services.

The framework does not use mapped objects, it works only on metadata.
I have already implemented this simple protocol:

before_commit(self, session):
   event_data=# get all pks for session.['dirty', 'new', 'deleted']

     session.add(Event( data=event_data))

   session.add(Event(data=event_data)) # gener
   self.pending_notifications = self.get_table_name(class_)
                                                       ^^^^
First Question: is there any way to do this without using a custom
mapper fuction? How does SQLAlchemy map the  call to
session.query(MappedObject) to a MetaData.tables[x]

after_commit:
   sent ta




-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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