Skip to content
Discussion options

You must be logged in to vote

Hi,

literal is generated automatically when using a literal with any sqlalchemy construct. So column('foo') + 1 is equivalent to column('foo') + literal(1)

In the example literal is explicit because otherwise the operation would be done by python: select('a' + 'b') is the same as select('ab'), meaning that it will generate SELECT :param_1 AS anon_1

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@anentropic
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by anentropic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants