Good day community.

I don't know whether it is a good place to asc.

I've used sqlalchemy with turbogears and there were no problems. Easy
and strateforward. I've got lots of tables with lots of TableClasses
where I implement application logic.

Now I'm trying to use sqlalchemy with twisted. So I need some magic
with threads. sAsync says it is a good place to start.  In mine
oppinion I see lots of tables separated into separate classes. But
when I try to create mine class with table I'm getting errors. sAsync
wants to now the whole database structure. but there seems to me no
metadata support :(

so I'm trying  such thing

class DUniqaPoliciPlanOplat(AccessBroker):
    def startup(self):
        self.table('polici_plan_oplat',
    Column(u'id_serii', PGInteger(), primary_key=True,
nullable=False),
            Column(u'nom_polica', PGBigInteger(), primary_key=True,
nullable=False),
            Column(u'plan_date', PGDate(), primary_key=True,
nullable=False),
            Column(u'plan_sum', PGFloat(precision=53,
asdecimal=False), primary_key=False),
            Column(u'cod_valuty', PGInteger(), primary_key=False),
            Column(u'payment_operation', PGBigInteger(),
primary_key=False),
            Column(u'doc_id', PGBigInteger(), primary_key=False),
            Column(u'is_paid', PGInteger(), primary_key=False),
    ForeignKeyConstraint([u'cod_valuty'],
[u'uniqa.spr_valut.cod_valuty'],
name=u'fk_polici_plan_oplat_cod_valuty'),
            ForeignKeyConstraint([u'nom_polica', u'id_serii'],
[u'uniqa.polici_object.nom_polica', u'uniqa.polici_object.id_serii'],
name=u'polici_plan_oplat_nom_polica_fkey'),
            ForeignKeyConstraint([u'doc_id'],
[u'documents.document_content.document_id'],
name=u'polici_plan_oplat_doc_id_fkey'),
            ForeignKeyConstraint([u'payment_operation'],
[u'accounting.operations.id_operation'],
name=u'polici_plan_oplat_payment_operation_fkey'),
    schema='uniqa'
    )


but that class could not be created 'cause it doesn't knows what are
the different tables. (foreign keys tables)??

creating 1 AccessBroker for the whole database - is a bit unhandy. To
be precise - unusable. Cause mine database structure contains over 200
tables with complicated relations.

Did anyone knows the solution for this problem?


Best regards, Ilya Dyoshin

P.S. sorry if this is a wrong place to ask.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to