def METHOD_NAME(self, results, idx):
    if results.get("number"):
        query = " ".join(
            [
                "jsonb_typeof(elems->'y') = 'number' AND (elems->>'y')::float",
                results.get("num_rel"),
                "%(property_value_{0})s".format(idx),
            ]
        )
        bind_name = results.get("number")
    elif results.get("eq_rel"):
        query = "elems->>'y' {0} %(property_value_{1})s".format(
            results.get("eq_rel"), idx
        )
        bind_name = results.get("value_term").lower()
    else:
        query = "elems->>'y' {0}LIKE %(property_value_{1})s".format(
            "NOT " if results.get("fuzzy_neq") else "", idx
        )
        bind_name = "%{0}%".format(results.get("value_term").lower())
    self.bind_params["property_value_" + idx] = bind_name
    return query