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