Re: [sqlalchemy] DefaultClause

2015-01-12 Thread Jose Soares
I see, thus, this definition: Column('abc', Unicode(20), server_default='abc') Column('adef', Numeric(12,3), server_default=text('1.5')), is equivalent to this one: Column('abc', Unicode(20), DefaultClause('abc')) Column('def', Numeric(12,3),

[sqlalchemy] session query and column names

2015-01-12 Thread Mehdi
Hi I want to make a query with given filters received from client side. client side sends a json array like this: [ 0DA: {conditionType: null, column: serialNumber, operator: GREATER_THAN, value: 50}, 1DG: {conditionType: AND, column: name, operator: EQUAL, value: john } ] I've managed

Re: [sqlalchemy] session query and column names

2015-01-12 Thread Jose Soares
Why don't you pass the params to session.query as a dictionary into filter_by as in: In [1]: by_where_clause=dict(specie_codice='42', specie_descrizione='Nutrie') In [2]: print session.query(Specie).filter_by( **by_where_clause ).count() 2015-01-12 12:37:40,518 INFO

[sqlalchemy] Alembic 0.7.4 Released

2015-01-12 Thread Michael Bayer
Hey list - Alembic 0.7.4 is released. This release fixes a short series of issues with the autogenerate feature. The changelog is available at: http://alembic.readthedocs.org/en/latest/changelog.html#change-0.7.4 -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] Postgres OID column in SQLA 0.8

2015-01-12 Thread Ven Karri
Hi Mike, Is there anyway, you can make the following changes to SQLA 0.8 ? https://bitbucket.org/zzzeek/sqlalchemy/commits/42bbb7163ada -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from

Re: [sqlalchemy] Postgres OID column in SQLA 0.8

2015-01-12 Thread Michael Bayer
sorry, 0.8 is not accepting changes other than critical security patches. you can create your own OID type and patch it into sqlalchemy.dialects.postgresql.base.ischema_names directly, assuming this is breaking on reflection for you. Ven Karri karri@gmail.com wrote: Hi Mike, Is

[sqlalchemy] Re: Debug ODBC Connection String for Custom Dialect

2015-01-12 Thread Lycovian
Looks like the *nix version of the ODBC driver I was using is simply wrapping the Windows logic for parameters for DNS-less connections contrary to the documentation For the record in Teradata for DNS-based connections the ODBC connection string would be on Linux:

Re: [sqlalchemy] DefaultClause

2015-01-12 Thread Michael Bayer
Jose Soares jose.soa...@sferacarta.com wrote: I see, thus, this definition: Column('abc', Unicode(20), server_default='abc') Column('adef', Numeric(12,3), server_default=text('1.5')), is equivalent to this one: Column('abc', Unicode(20), DefaultClause('abc'))

Re: [sqlalchemy] session query and column names

2015-01-12 Thread Mehdi
How could i guess the proper aliased column name then? In your example your table is specie and column name is codice, so you used specie_codice=42. but as i said i have joins and longer column names, so sometimes i get like table1.somelongcolumn AS table1_somelong_7. On Monday, January 12,