avoid index-use on rank parameters for reverse lookups

This commit is contained in:
Sarah Hoffmann
2023-07-08 21:47:07 +02:00
parent f4cdcb995c
commit d743cf308e
2 changed files with 19 additions and 10 deletions

View File

@@ -48,9 +48,7 @@ class Geometry(types.UserDefinedType): # type: ignore[type-arg]
def bind_expression(self, bindvalue: SaBind) -> SaColumn:
return sa.func.ST_GeomFromText(bindvalue,
sa.bindparam('geometry_srid', value=4326, literal_execute=True),
type_=self)
return sa.func.ST_GeomFromText(bindvalue, sa.text('4326'), type_=self)
class comparator_factory(types.UserDefinedType.Comparator): # type: ignore[type-arg]