In Elixir or SQLAlchemy, is there a way to also store a comment for a/each field in my entities?

Posted by kchau on Stack Overflow See other posts from Stack Overflow or by kchau
Published on 2010-03-23T12:32:22Z Indexed on 2010/03/23 12:33 UTC
Read the original article Hit count: 313

Filed under:
|
|

Our project is basically a web interface to several systems of record. We have many tables mapped, and the names of each column aren't as well named and intuitive as we'd like... The users would like to know what data fields are available (i.e. what's been mapped from the database). But, it's pointless to just give them column names like: USER_REF1, USER_REF2, etc.

So, I was wondering, is there a way to provide a comment in the declaration of my field?

E.g.

class SegregationCode(Entity):
    using_options(tablename="SEGREGATION_CODES")
    segCode = Field(String(20), colname="CODE", ...
                    primary_key=True) #Have a comment attr too?

If not, any suggestions?

© Stack Overflow or respective owner

Related posts about python

Related posts about elixir