On Sun, Jun 13, 2010 at 09:23:22PM +0000, Faheem Mitha wrote:
> Sqlalchemy's table can take the qschema as argument, eg.
> 
> pheno_table = Table(
>     'pheno', metadata,
>     Column('patientid', String(60), primary_key=True),
>     Column('famid', String(60), nullable=True),
>     Column('sex_id',  None, ForeignKey(schemaname+'.sex.val', 
> onupdate='CASCADE', ondelete='CASCADE'), index=True),
>     Column('race_id',  None, ForeignKey(schemaname+'.race.val', 
> onupdate='CASCADE', ondelete='CASCADE'), index=True),
>     Column('phenotype', SmallInteger),
>     schema = schemaname,
>     )
> 
> So I don't think you do have to do that.

The thing is that each table will be present in every schema. So I can't
use the schema parameter (or I can subclass Table like Mike suggested).


Cheers,

-- 
  Henry PrĂȘcheur

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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.

Reply via email to