On Mon, Jan 20, 2020, at 1:46 PM, Andrei Pashkin wrote:
> Hello!
> 
> I wonder - is it possible to parametrize where expression as a whole like 
> that: 
> select([users_table]).where(bindparam('criteria'))

nope, that's not how SQL bound parameters work.

> 
> ?
> 
> My use case is that I'd like to pre-compile a complex SQLAlchemy expression 
> to avoid redundant computations and achieve the same effect as Bakery has for 
> the ORM but only for a low-level SA expression.

Wait for SQLAlchemy 1.4, this will have that feature.




> 
> 
> 
> 

> --
>  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 full 
> description.
>  --- 
>  You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/c6a93f06-7ec4-4a00-bc8b-4e34f58e28ac%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy/c6a93f06-7ec4-4a00-bc8b-4e34f58e28ac%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/f3cd6098-4160-433c-a3c7-aa5a9ad4f998%40www.fastmail.com.

Reply via email to