class UrlFunctions {

    @Description("Escape a string for use in URL query parameter names and values")
    @ScalarFunction
    @LiteralParameters({"x", "y"})
    @Constraint(variable = "y", expression = "min(2147483647, x * 12)")
    @SqlType("varchar(y)")
    public static Slice urlEncode(@SqlType("varchar(x)") Slice value)
    {
        Escaper escaper = UrlEscapers.urlFormParameterEscaper();
        return slice(escaper.escape(value.toStringUtf8()));
    }

    private  UrlFunctions();

}