Re: [sqlalchemy] ".contains" query with VARBINARY Column

2022-07-13 Thread Mike Bayer
as replied on the issue I'd rather improve the behavior. On Wed, Jul 13, 2022, at 12:29 PM, Peter Harrison wrote: > Thanks Mike, > > The examples on the documentation page only show how to work with strings. > Could this be updated? https://docs.sqlalchemy.org/en/14/core/sqlelement.html > >

Re: [sqlalchemy] ".contains" query with VARBINARY Column

2022-07-13 Thread Peter Harrison
Thanks Mike, The examples on the documentation page only show how to work with strings. Could this be updated? https://docs.sqlalchemy.org/en/14/core/sqlelement.html Specifically: 1. ColumnOperators.endswith() 2. ColumnOperators.contains() 3. ColumnOperators.like() 4.

Re: [sqlalchemy] ".contains" query with VARBINARY Column

2022-07-13 Thread Mike Bayer
you're sending a Python bytestring as the expression for which there's no explicit support for operators like concat, contains, etc. the solution is to build the SQL composition directly using func.concat , or just building up the LIKE expression in Python, so that there's no ambiguity

[sqlalchemy] ".contains" query with VARBINARY Column

2022-07-13 Thread Peter Harrison
Hello, I'm having an issue with a "contains" query on a VARBINARY column. It appears the statement compiles incorrectly, or I am not using SQLAlchemy correctly. I know the MySQL CLI query that works correctly as you will see below, but I don't know how to get it. The CLI query is only one