Good day community.

first of all I want to say that I'm 2nd day with python... and
SQLAlchemy so maybe I don't understand the whole idea

I already have database (postgresql)

for mapping mine database to classes I use such a thing

(I'm using SQLAlchemy with trubogears)


table_object = Table('table_name', metadata, schema='schema_name',
autogenerate=True)

class TableClass(object):
    def somemethod(self, param)
        pass

mapper(TableClass, table_object)




that works fine for me and i can write queries with TableClass ...
cool!!!

now the different task somewhere in the controller (but I can see
mapper, metadata and so on) i get the table_name and the schema_name

its easy to create table inside the method... but I want to find which
tableclass was mapped to this pair (table_name, schema_name). and to
use that exact method

I want something like that

object = some_sql_alchemy_container.some_method(table_name,
schema_name)
object.somemethod(with_param)


Is this possible ?? If yes - how to achieve this result ?


Best regards,
Ilya Dyoshin


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to