Re: [sqlalchemy] get to dialect specific column type

2010-09-22 Thread werner
I tried with a hack to get to this, but still no luck. I am doing: from sqlalchemy.dialects.firebird import dialect ... fbDialect = dialect() ... if str(col.type) == 'DATETIME': print col.type.dialect_impl(fbDialect) print col.type.get_dbapi_type(fbDialect)

Re: [sqlalchemy] get to dialect specific column type

2010-09-22 Thread Michael Bayer
On Sep 22, 2010, at 3:06 AM, werner wrote: I tried with a hack to get to this, but still no luck. I am doing: from sqlalchemy.dialects.firebird import dialect ... fbDialect = dialect() ... if str(col.type) == 'DATETIME': print col.type.dialect_impl(fbDialect)

Re: [sqlalchemy] get to dialect specific column type

2010-09-22 Thread werner
I try to explain in more detail what I am trying to do. class Country(Base, CreateUpdateMixin): __tablename__ = u'countries' id = sa.Column(sa.BigInteger(), sa.Sequence('countries_id'), primary_key=True, nullable=False) name = sa.Column(sa.String(length=30,

Re: [sqlalchemy] get to dialect specific column type

2010-09-22 Thread Michael Bayer
On Sep 22, 2010, at 12:19 PM, werner wrote: Witin make_localize_view I need to generate a stored procedure which gets information such as columns etc from Country and Country_L , the generated code looks like this: CREATE OR ALTER PROCEDURE countries_lp returns (created_at DATE,

[sqlalchemy] get to dialect specific column type

2010-09-20 Thread werner
I am trying to automatically generate the stored procedure I need for the localize stuff. So, would like to do something like this: aninst.__table__.c['created_at'].type.get_dbapi_type(dbapi) - to get e.g. TIMESTAMP for a DateTime column with Firebird SQL. What is the most efficient/easy