Is there a way in SA 0.7.6 to define computed columns as part of other
DeclarativeBase columns?
Currently I do manual DDL, but would like to get things setup to be able
to easier move to another db backend.
Most of my computed columns are calculations like the one on
AVAILCAPACITY below, but also have a few simple selects like in the
USEDCAPACITY column.
CREATE TABLE WINERACKIT (
WINERACKITID PKEYS NOT NULL,
SPLIT INTEGER NOT NULL,
CAPACITY INTEGER DEFAULT 0,
FK_WINERACKBID PKEYS NOT NULL /* PKEYS = BIGINT */,
USEDCAPACITY COMPUTED BY ((SELECT COUNT(BOTTAG.TAGNO) FROM
BOTTAG WHERE BOTTAG.FK_WINERACKIT_ID = WINERACKIT.ID)),
AVAILCAPACITY COMPUTED BY (CAPACITY-USEDCAPACITY)
Thanks in advance for some pointers on how to do this.
Werner
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.