[storm] Meta data

James Henstridge james at jamesh.id.au
Wed Jul 9 07:35:05 BST 2008


On Tue, Jul 8, 2008 at 11:52 PM, Gerdus van Zyl <gerdusvanzyl at gmail.com> wrote:
> I am trying to store all database column information in the storm
> column object. Eg. size of varchar columns, decimal precision, is this
> column included in an index, default value in database, etc.

If you are trying to generate database schemas from the Python
classes, I'd recommend against it.  I wrote a bit on the subject here:

    http://blogs.gnome.org/jamesh/2007/09/28/orm-schema-generation/


> Note that i use the existing _variable_kwargs dictionary of Property
> class, the code i posted was just so that storm doesn't throw an
> exception on creating the variable class because of an unknown keyword
> argument. (so self._extrakwargs = otherkwargs in my posted code can be
> removed, it's not necessary, just the **otherkwargs)

Storing things on the Property makes a lot more sense than on
Variable, but as I said above it probably isn't what you want in the
long run.

James.



More information about the storm mailing list