On Tuesday, February 12, 2019 at 6:14:44 PM UTC-5, Mike Bayer wrote:
>
> as you know I prefer making things possible to making things assumed
> :) , because in the latter case, I have to keep attending to those
> assumptions as they change.The whole "rewrite EXPANDING" part of
> defaultdia
On Tue, Feb 12, 2019 at 1:24 PM Jonathan Vanasco wrote:
>
> This looks very useful to other pg users. What about making this part of the
> PostgreSQL dialect somehow?
as you know I prefer making things possible to making things assumed
:) , because in the latter case, I have to keep attending t
This looks very useful to other pg users. What about making this part of
the PostgreSQL dialect somehow?
--
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.
On Mon, Feb 11, 2019 at 3:37 PM Martin Stein wrote:
>
> So I have replaced the regex-based rewrite with the PGValuesParam approach
> that we talked about. One issue with the regex-based rewrite was that in its
> current form it breaks for parameter-lists > 10 elements, because the inner
> sorte
So I have replaced the regex-based rewrite with the PGValuesParam approach
that we talked about. One issue with the regex-based rewrite was that in
its current form it breaks for parameter-lists > 10 elements, because the
inner sorted(..) call does string-based sorting:
'IN \\(%\\(parent_ids_1\
On Fri, Feb 8, 2019 at 10:05 AM Martin Stein wrote:
>
> Am Donnerstag, 7. Februar 2019 23:45:09 UTC+1 schrieb Mike Bayer:
>>
>>
>>
>> note the mentioned issue is closed. IN supports an inline parameter now:
>>
>> https://docs.sqlalchemy.org/en/rel_1_2/orm/extensions/baked.html#baked-in
>>
>
> We
Am Donnerstag, 7. Februar 2019 23:45:09 UTC+1 schrieb Mike Bayer:
>
>
>
> note the mentioned issue is closed. IN supports an inline parameter now:
>
> https://docs.sqlalchemy.org/en/rel_1_2/orm/extensions/baked.html#baked-in
>
>
We had started using the .op('IN') approach around v1.1 and I hadn'
On Thu, Feb 7, 2019 at 3:59 PM Martin Stein wrote:
>
> We are using Postgres, the baked extension and have code along these lines:
>
> query = bakery(
> lambda s: s.query(Item)
>.filter(Item.parent_id.op('IN')(bindparam('parent_ids')))
>
>
> result = query(dbses
We are using Postgres, the baked extension and have code along these lines:
query = bakery(
lambda s: s.query(Item)
.filter(Item.parent_id.op('IN')(bindparam('parent_ids')))
result = query(dbsession).params(parent_ids=tuple(parent_ids)).all()
The .op('IN') ap