[storm] proposal for improvement
Thomas K.
canonical at sce-gbr.de
Thu Jun 18 08:34:57 BST 2009
Hi Gustavo,
> What about having a "schema" attribute which takes an arbitrary annotation?
>
> Something like Int("name", primary=True, schema=...)
>
> Would that be useful at all?
>
Why not? It brings a connection between necessary definitions for
querying tables by storm and attributes, which are necessary for
creating and modifying the defined table. But that's the first step.
The next step is now to define, what's the content of this attribut
"schema". Because it's a named attribute it should have a "defined
type", means that it would be a good idea to define a class, which holds
informations for "schema". (to hold this "type" open, means it's a
"personal" flavour what's assigned, is not a good idea. You will get
many different solutions with different interfaces, which are not
compatible together) Informations could mean something like zope.schema
(hi Stephen! ;-) ) for the connection to an middleware provider. (that's
what zope.schema provides in my opinion) But for creating or modifying
tables it's necessary to define for example IsNULL, size, defaults and
many other values. The problem here is to give a possibility to store
informations for __any specialized value__, which is maybe used only by
one database adapter. (which is possible now or in future)
So we need ideas to solve this: On one hand to store informations, which
are needed by creating tables or modifying tables (maybe later, maybe
never, this is a really complex area) and on the other hand to give a
connection to, for example, middleware. For me, the first part is
necessary, the second could be a solution for others and so also necessary.
And a last question is to answer: what, if a column dosn't define this
schema attribute: create (for example) table with defaults or do not
create table at all because of missing schema attribute.
So, this are my "2 cents" for the moment.
cu, Thomas
More information about the storm
mailing list