def get_select_format(self, fld):
        """
        Returns the selection format string, depending on the requirements
        of the spatial backend.  For example, Oracle and MySQL require custom
        selection formats in order to retrieve geometries in OGC WKT. For all
        other fields a simple '%s' format string is returned.
        """
        if SpatialBackend.select and hasattr(fld, 'geom_type'):
            # This allows operations to be done on fields in the SELECT,
            # overriding their values -- used by the Oracle and MySQL
            # spatial backends to get database values as WKT, and by the
            # `transform` method.
            sel_fmt = SpatialBackend.select

            # Because WKT doesn't contain spatial reference information,
            # the SRID is prefixed to the returned WKT to ensure that the
            # transformed geometries have an SRID different than that of the
            # field -- this is only used by `transform` for Oracle and
            # SpatiaLite backends.
            if self.transformed_srid and ( SpatialBackend.oracle or
                                           SpatialBackend.spatialite ):
                sel_fmt = (self.transformed_srid, sel_fmt) % "'SRID=%d;'||%s"
        else:
            sel_fmt = '%s'
        return sel_fmt

    # Private API utilities, subject to change.
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/db/models/sql/query.py/GeoQuery.get_select_format/swapped operands of `%`