Re: [sqlalchemy] Re: Specify query_cls for the one query

2016-07-13 Thread Антонио Антуан
Amazing! :) Big thanks. ср, 13 июл. 2016 г. в 12:59, Simon King : > OK, I have to admit that I haven't fully understood the details of > what you are doing. However, it sounds like you are implementing > horizontal sharding, which SQLAlchemy has a bit of support for: > >

Re: [sqlalchemy] Re: Specify query_cls for the one query

2016-07-13 Thread Simon King
OK, I have to admit that I haven't fully understood the details of what you are doing. However, it sounds like you are implementing horizontal sharding, which SQLAlchemy has a bit of support for: http://docs.sqlalchemy.org/en/latest/orm/extensions/horizontal_shard.html

Re: [sqlalchemy] Re: Specify query_cls for the one query

2016-07-12 Thread Антонио Антуан
Ok, I define my situation. At first, I'm appologizing for my accent :) I have two databases, postgresql and vertica. I have some amount of large tables, besides other tables. Postgres stores only last two hours (or last week, depends on table) of large tables, vertica stores all other data. I

Re: [sqlalchemy] Re: Specify query_cls for the one query

2016-07-12 Thread Simon King
Could you describe what you are trying to achieve? There's nothing about Mike's suggestion that means you need to create a new session - you can reuse any existing session. What does your CustomQueryCls do? Perhaps there's another way of doing what you want? Simon On Tue, Jul 12, 2016 at 11:09

[sqlalchemy] Re: Specify query_cls for the one query

2016-07-12 Thread Антонио Антуан
But it means that I should create one more session with one more connection to DB. This is not good for me :( понедельник, 11 июля 2016 г., 22:23:11 UTC+3 пользователь Антонио Антуан написал: > > Can I specify query_cls only for a one query? I try to change > query.session._query_cls and, of