zio / zio-quill

Compile-time Language Integrated Queries for Scala
https://zio.dev/zio-quill
Apache License 2.0
2.15k stars 346 forks source link

Like operator generating wrong sql with SqlDialect #2533

Open Nechama-Miller opened 2 years ago

Nechama-Miller commented 2 years ago

This template isn't a strict requirement to open issues, but please try to provide as much information as possible.

Version: 3.13.0 Module: quill-jdbc Database: sql server

Expected behavior

case class Document(filename: String) val documents = quote(querySchema[Document]("document")) run(documents.filter(_.filename like "A%")) // Generated sql should be: SELECT x6.filename FROM document x6 WHERE x6.filename like 'A%'

Actual behavior

Generated sql IS: SELECT x6.filename FROM document x6 WHERE 1 = x6.filename like 'A%'

@getquill/maintainers

yisraelU commented 2 years ago

https://github.com/zio/zio-quill/issues/2124