On Thu, Apr 18, 2019 at 4:30 PM Markus Elfring <markus.elfr...@web.de> wrote:
>
> > it will generate the same SQL and provide "2" for the bound value
> > instead of "1".
>
> Why is the expression “func.count(Address.id) > literal_column("2")”
> not referenced there?

there's no reason to refer to this, literal values should be passed as
bound parameters unless there is some reason they shouldn't.

>
>
> > I don't know what SQL you are attempting to render.
>
> I would like to get an asterisk instead of the parameters “count_1” and 
> “count_2”.

again there is no reason for the asterisk to render in the text unless
you are using the text in some other way besides executing it.   use
literal_column('*') if you prefer.

if you are trying to print your SQL to a file or use it for display
purposes, there are separate instructions for this at
https://docs.sqlalchemy.org/en/13/faq/sqlexpressions.html#how-do-i-render-sql-expressions-as-strings-possibly-with-bound-parameters-inlined





>
> Regards,
> Markus

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to