Skip to content

Commit 4758bd0

Browse files
committed
Lookups: statwith is handle by BuiltinLookup.
1 parent 0a35a3d commit 4758bd0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

django_mongodb/lookups.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Exact,
88
IntegerFieldOverflow,
99
IsNull,
10-
StartsWith,
1110
)
1211
from django.db.models.sql.where import AND, XOR, WhereNode
1312

@@ -90,12 +89,6 @@ def contains(self, compiler, connection):
9089
return {lhs_mql: safe_regex("%s")(value)}
9190

9291

93-
def starts_with(self, compiler, connection):
94-
lhs_mql = process_lhs(self, compiler, connection)
95-
value = process_rhs(self, compiler, connection)
96-
return {lhs_mql: safe_regex("^%s")(value)}
97-
98-
9992
def is_null(self, compiler, connection):
10093
lhs_mql = process_lhs(self, compiler, connection)
10194
return {lhs_mql: None} if self.rhs is True else {lhs_mql: {"$ne": None}}
@@ -119,7 +112,6 @@ def builtin_lookup(self, compiler, connection):
119112
def register_lookups():
120113
WhereNode.as_mql = where_node
121114
Exact.as_mql = exact
122-
StartsWith.as_mql = starts_with
123115
IsNull.as_mql = is_null
124116
Contains.as_mql = contains
125117
In.as_mql = in_

0 commit comments

Comments
 (0)