orm: fix the generated SQL for the "not equal" operator (#20321)

This commit is contained in:
Elliot Chance 2024-01-01 12:11:23 +01:00 committed by GitHub
parent e333d548f3
commit b3eae7831e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,9 @@ pub enum SQLDialect {
fn (kind OperationKind) to_str() string {
str := match kind {
.neq { '!=' }
// While most SQL databases support "!=" for not equal, "<>" is the standard
// operator.
.neq { '<>' }
.eq { '=' }
.gt { '>' }
.lt { '<' }