|
From: Oleg B. <ph...@ma...> - 2004-05-11 21:07:41
|
On Tue, May 11, 2004 at 04:56:33PM -0400, Eduardo Elgueta wrote:
> What I would like to have is something like this:
>
> def MyOnUpdate (sqlObj):
> sqlObj.addColumn(StringCol("updateBy", "me");
> sqlObj.addColumn(DateTimeCol("updateOn", now());
>
> def MyOnInsert (sqlObj):
> sqlObj.addColumn(StringCol("createdBy", "me");
> sqlObj.addColumn(DateTimeCol("createdOn", now());
> MyOnUpdate(sqlObj)
>
> def MySQLObject1 (SQLObject):
> myField = StringCol()
> onInsert = MyOnInsert(self)
> onUpdate = MyOnUpdate(self)
>
> def MySQLObject2 (SQLObject):
> myField = IntCol()
> onInsert = MyOnInsert(self)
> onUpdate = MyOnUpdate(self)
>
> What I need is to find the place to insert the self.onUpdate(self) call.
>
> PS: In other words, I need triggers which MySQL (my database backend)
> does not provide.
I do not understand what you really want. May be all you need is jsut
an accessor?
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|