Re: [SQLObject] Finding StringCol lengths
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-03-01 17:59:24
|
jws...@ra... wrote: > To create a basic gui form interface to my objects, I need to be able to get > some sort of hints regarding the name, number and size of fields the object > has. I can get a list of columns with _SO_Columns or _SO_columnDict, but > that does not contain the field lengths I specified in my classes. My > strategy was to create a public method that combined the private methods > above and the length information from wherever I could find it. However, it > seems that the length, if specified, is only used for validation and table > creation. Where can I extract this information? I believe you can get it through _SO_columnDict[colName].length, though only for StringCols, of course. If you look in Col.SOString you'll see it being assigned. Ian |