[Grok-dev] Automatically execute a procedure on saving/loading from Sql database with MeGrok and SQLAlchemy

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Oct 25 02:16:53 EDT 2010

On 10/23/10 00:36 , Hector Blanco wrote:
> Is there a way to automatically execute an stored procedure (SQL
> preferably, but I could do it on the "Python" side) so when the class is
> saved, that list field will be automatically joined (with whatever
> separator character) and when the class (or that field) is loaded, it
> will be automatically split-ed (so it will come back as a list)?

I'm not using Grok in combination with a RDBM, but, would a decorator be 
usefull in this case? The decorated function could be the facade for the 
actual stored value and do the joining in the setter and the spltting in 
the getter.

regards, jw

More information about the Grok-dev mailing list