Hello!I wonder - is it possible to parametrize where expression as a whole like that:select([users_table]).where(bindparam('criteria'))
?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.
--SQLAlchemy -The Python SQL Toolkit and Object Relational MapperTo 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 sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/c6a93f06-7ec4-4a00-bc8b-4e34f58e28ac%40googlegroups.com.
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.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlal...@googlegroups.com.