mirror of
https://github.com/django/django.git
synced 2024-12-22 09:05:43 +00:00
Refs #34060 -- Fixed JSONField __exact lookup for primitivies on Oracle 21c+.
Regression in c991602ce5
.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
f25d84f61a
commit
26aae56144
@ -313,7 +313,10 @@ class JSONExact(lookups.Exact):
|
||||
def as_oracle(self, compiler, connection):
|
||||
lhs, lhs_params = self.process_lhs(compiler, connection)
|
||||
rhs, rhs_params = self.process_rhs(compiler, connection)
|
||||
return f"JSON_EQUAL({lhs}, {rhs})", (*lhs_params, *rhs_params)
|
||||
if connection.features.supports_primitives_in_json_field:
|
||||
lhs = f"JSON({lhs})"
|
||||
rhs = f"JSON({rhs})"
|
||||
return f"JSON_EQUAL({lhs}, {rhs} ERROR ON ERROR)", (*lhs_params, *rhs_params)
|
||||
|
||||
|
||||
class JSONIContains(CaseInsensitiveMixin, lookups.IContains):
|
||||
|
Loading…
Reference in New Issue
Block a user