On Wed, Jun 4, 2008 at 12:09 PM, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> Lukasz Szybalski schrieb:
>> I started using info dict on a column names in sa file definitions. It
>> would be nice to save it to db if once could. What db supports
>> comments and what table name is it?
>
> Oracle and PostgreSQL have the "comment on" SQL statement. MySQL has a
> comment clause for column definitions. SA could abstract away these
> differences, the syntax would be something like this:
>
> users = Table('users', metadata,
> Column('id', Integer, primary_key=True),
> Column('name', String(40), comment="The Unix user name"),
> Column('fullname', String(100), comment="Full name with title"))
I think I prefer "info" dictionary rather then a string. Dict "info"
which I use already have something like this:
sqlalchemy.Column('DRIVE_TRAIN', sqlalchemy.Unicode(4)
,info={"description":"DRIVE TRAIN TYPE [AWD,4WD,FWD,RWD]"}),
sqlalchemy.Column('FUEL_SYS', sqlalchemy.Unicode(4)
,info={"description":"FUEL SYSTEM CODE",
"FI":"FUEL INJECTION",
"TB":"TURBO"}),
Would be nice if the whole dictionary was written to a database. I
could use info[description], info[FI], info[TB] etc... when I display
data. That would be really useful definition!!!
Lucas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---