FYI ive been thinking of adding another layer to "default", where a default-producing SQL query or function would be embedded at runtime into the INSERT or UPDATE statement's argument clause. This would be in contrast to PassiveDefault as it is currently, which only defines a "DEFAULT" on a column definition, and ColumnDefault, which even if it references a SQL statement, will "pre-execute" the statement outside of the actual insert/update. this would allow onupdate defaults to fire inline as well as allowing a wider variety of oninsert defaults.
So i was thinking of maybe calling it PassiveDefault(something, inline=True). although its not entirely "passive" (also the "passive" name in general kind of sucks since it doesnt describe itself well). any suggestions ? On Aug 29, 2006, at 2:51 PM, Jonathan Ellis wrote: > On 8/25/06, Mike Bernson <[EMAIL PROTECTED]> wrote: >> I am look for a way of getting the default value defined on a >> column in >> a table. >> >> I have table and column objects. I get the default attribute for the >> column. If it is a null everything is ok. If it is a PassiveDefault >> object (might by other object ?) > > Defaults defined in the db are PassiveDefault. Defaults defined at > the python level are ColumnDefault. > >> how do I get the default value from >> the PassiveDefault object. > > just "passivedefault.arg". > > Caveat: sqlite sucks and doesn't really expose the default definition, > so all args in sqlite are '?', which is enough for SA to know it needs > to ask the db what value was inserted, but not enough to re-create the > CREATE TABLE source. > > -- > Jonathan Ellis > http://spyced.blogspot.com > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users