public String toString(SqlFunctionProperties properties)
    {
        StringBuilder buffer = new StringBuilder();
        if (isSingleValue()) {
            buffer.append('[');
            appendQuotedValue(buffer, low, properties);
            buffer.append(']');
        }
        else {
            buffer.append((low.getBound() == Marker.Bound.EXACTLY) ? '[' : '(');
            if (low.isLowerUnbounded()) {
                buffer.append("<min>");
            }
            else {
                appendQuotedValue(buffer, low, properties);
            }
            buffer.append(", ");
            if (high.isUpperUnbounded()) {
                buffer.append("<max>");
            }
            else {
                appendQuotedValue(buffer, high, properties);
            }
            buffer.append((high.getBound() == Marker.Bound.EXACTLY) ? ']' : ')');
        }
        return buffer.toString();
    }
@Test
    public void testToString()
    {
        Range range = Range.all(VARCHAR);
        assertEquals(range.toString(PROPERTIES), "(<min>, <max>)");

        range = Range.equal(VARCHAR, utf8Slice("some string"));
        assertEquals(range.toString(PROPERTIES), "[\"some string\"]");

        range = Range.equal(VARCHAR, utf8Slice("here's a quote: \""));
        assertEquals(range.toString(PROPERTIES), "[\"here's a quote: \\\"\"]");

        range = Range.equal(VARCHAR, utf8Slice(""));
        assertEquals(range.toString(PROPERTIES), "[\"\"]");

        range = Range.greaterThanOrEqual(VARCHAR, utf8Slice("string with \"quotes\" inside")).intersect(Range.lessThanOrEqual(VARCHAR, utf8Slice("this string's quote is here -> \"")));
        assertEquals(range.toString(PROPERTIES), "[\"string with \\\"quotes\\\" inside\", \"this string's quote is here -> \\\"\"]");

        range = Range.greaterThan(VARCHAR, utf8Slice("string with \"quotes\" inside")).intersect(Range.lessThan(VARCHAR, utf8Slice("this string's quote is here -> \"")));
        assertEquals(range.toString(PROPERTIES), "(\"string with \\\"quotes\\\" inside\", \"this string's quote is here -> \\\"\")");

        range = Range.equal(VARCHAR, utf8Slice("<min>"));
        assertEquals(range.toString(PROPERTIES), "[\"<min>\"]");

        range = Range.equal(VARCHAR, utf8Slice("<max>"));
        assertEquals(range.toString(PROPERTIES), "[\"<max>\"]");

        range = Range.equal(VARCHAR, utf8Slice("<min>, <max>"));
        assertEquals(range.toString(PROPERTIES), "[\"<min>, <max>\"]");

        range = Range.greaterThanOrEqual(VARCHAR, utf8Slice("a")).intersect(Range.lessThanOrEqual(VARCHAR, utf8Slice("b")));
        assertEquals(range.toString(PROPERTIES), "[\"a\", \"b\"]");

        range = Range.equal(VARCHAR, utf8Slice("a, b"));
        assertEquals(range.toString(PROPERTIES), "[\"a, b\"]");
    }