Inheritance: ExactStringQueryValue
Esempio n. 1
0
        [Test] // http://bugzilla.gnome.org/show_bug.cgi?id=644145
        public void EscapeUriWithStartsWithOperator ()
        {
            QueryValue val = new ExactUriStringQueryValue ();
            val.ParseUserQuery ("/mnt/mydrive/rock & roll");

            Assert.AreEqual (
                @"(CoreTracks.Uri IS NOT NULL AND" + 
                @" CoreTracks.Uri LIKE 'file:///mnt/mydrive/rock\%20&\%20roll%' ESCAPE '\')",
                UriField.ToSql (StringQueryValue.StartsWith, val)
            );
        }
Esempio n. 2
0
        [Test] // http://bugzilla.gnome.org/show_bug.cgi?id=612152
        public void EscapeUri ()
        {
            QueryValue val = new ExactUriStringQueryValue ();
            val.ParseUserQuery ("space 3quotes`'\"underscore_percentage%slash/backslash\\");

            Assert.AreEqual (
                @"(CoreTracks.Uri IS NOT NULL AND CoreTracks.Uri LIKE '%space\%203quotes\%60''\%22underscore\_percentage\%25slash/backslash\%5C%' ESCAPE '\')",
                UriField.ToSql (StringQueryValue.Contains, val)
            );
        }