File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- from django .db .models .expressions import Col
1
+ from django .db .models .expressions import Col , Value
2
2
3
3
4
4
def col (self , compiler , connection ): # noqa: ARG001
5
5
return f"${ self .target .column } "
6
6
7
7
8
+ def value (self , compiler , connection ): # noqa: ARG001
9
+ return self .value
10
+
11
+
8
12
def register_expressions ():
9
13
Col .as_mql = col
14
+ Value .as_mql = value
Original file line number Diff line number Diff line change @@ -134,9 +134,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
134
134
"lookup.tests.LookupQueryingTests.test_filter_exists_lhs" ,
135
135
# QuerySet.alias() doesn't work.
136
136
"lookup.tests.LookupQueryingTests.test_alias" ,
137
- # Value() not supported.
138
- "lookup.tests.LookupQueryingTests.test_annotate_literal_greater_than_field" ,
139
- "lookup.tests.LookupQueryingTests.test_annotate_value_greater_than_value" ,
140
137
# annotate() with combined expressions doesn't work:
141
138
# 'WhereNode' object has no attribute 'field'
142
139
"lookup.tests.LookupQueryingTests.test_combined_annotated_lookups_in_filter" ,
You can’t perform that action at this time.
0 commit comments