Re: [sqlalchemy] Strict many-to-many

2017-10-04 Thread Tolstov Sergey
> > Thanks, that's really good With thanks, Sergey Tolstov -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a

Re: [sqlalchemy] custom type

2017-10-04 Thread Mike Bayer
On Wed, Oct 4, 2017 at 10:47 PM, sqlalchemy_mysql wrote: > When query with specific column loads properly and I can see > 'result_processor' and/or 'process_result_value' is invoked with correct > value but when query directly on Model (no explicit column is specified but > all columns are queried

[sqlalchemy] custom type

2017-10-04 Thread sqlalchemy_mysql
When query with specific column loads properly and I can see 'result_processor' and/or 'process_result_value' is invoked with correct value but when query directly on Model (no explicit column is specified but all columns are queried in this case by default) invokes those methods with None valu

Re: [sqlalchemy] How to add comments inside a big query using Classical SQLAlchemy?

2017-10-04 Thread Mike Bayer
On Wed, Oct 4, 2017 at 5:57 PM, Matthew Moisen wrote: > I'm using Classic SQLAlchemy to create SQL statements, which are later > formatted with sqlparse and stored in a file. I'm not executing the SQL > through SQLAlchemy. > > > Some of the queries have complexities that would benefit from a comme

Re: [sqlalchemy] Strict many-to-many

2017-10-04 Thread Mike Bayer
On Wed, Oct 4, 2017 at 2:22 AM, Tolstov Sergey wrote: > I have some tables who have a strict many-to-many rules. But i can't > undestand, how i can create rules for them. For strict on one point i use > init check, such us: > > def __init__(self,**kwargs): > for i in kwargs.items():setattr(sel

[sqlalchemy] How to add comments inside a big query using Classical SQLAlchemy?

2017-10-04 Thread Matthew Moisen
I'm using Classic SQLAlchemy to create SQL statements, which are later formatted with sqlparse and stored in a file. I'm not executing the SQL through SQLAlchemy. Some of the queries have complexities that would benefit from a comments. Is there any way to get SQLAlchemy to output a query l