-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL syntax when call delete method #2911
Comments
You might need to def deletePersonWithId(id: Int) =
quote {
querySchema[Person]("Person").filter(_.age == lift(id)).delete
} |
@guizmaii I do same as your comment but I still get error: |
@lynt1 What is the generated query, please? Because the code seems to be valid. |
I faced a similar problem. It seems the reason is that generated query uses an alias in a way that Mariadb "does not support". case class TestQuillDelete(id: Long) and quill.run(quote(query[TestQuillDelete].filter(_.id < lift(2L)).delete)) The generated query is:
Which is executed with similar to topic starter's error. Whereas a query without aliases executed correctly: Versions: |
This template isn't a strict requirement to open issues, but please try to provide as much information as possible.
Version: 4.8.0
Module: quill-jdbc-zio
Database: mariadb 10.9
Steps to reproduce the behavior
Run: querySchema("Person").filter(person => person.age == 3).delete
With error:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'person WHERE person.age = 3' at line 1
@getquill/maintainers
The text was updated successfully, but these errors were encountered: