2004-04-22 Juraj Skripsky <juraj@hotfeet.ch>
authorJuraj Skripsky <js@hotfeet.ch>
Thu, 22 Apr 2004 09:46:17 +0000 (09:46 -0000)
committerJuraj Skripsky <js@hotfeet.ch>
Thu, 22 Apr 2004 09:46:17 +0000 (09:46 -0000)
* Parser.jay: Allow computed expressions on left-hand side of
"like" operator.
Correct ordering for "is null" rule ("NOT IS NULL" => "IS NOT NULL").

svn path=/trunk/mcs/; revision=25826

mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog
mcs/class/System.Data/Mono.Data.SqlExpressions/Parser.jay

index 793dbff83955fa37d309dca370d664c20b10547d..26bd087127b7de76ef84d4f1f2e7669985d15444 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-22  Juraj Skripsky <juraj@hotfeet.ch>
+
+       * Parser.jay: Allow computed expressions on left-hand side of
+       "like" operator.
+       Correct ordering for "is null" rule ("NOT IS NULL" => "IS NOT NULL"). 
+
 2004-04-20  Juraj Skripsky <juraj@hotfeet.ch>
 
        * Tokenizer.cs (ReadNumber): Correctly consume decimal point
index d2e9d1d8d866bb703d702221ea468854d4de8419..fe8c63c67b513e78e2049602d1091b1466d46fd4 100644 (file)
@@ -274,18 +274,18 @@ IsPredicate
        {
                $$ = new Comparison (Operation.EQ, (IExpression)$1, new Literal (null));
        }
-       | ColumnValue NOT IS NULL
+       | ColumnValue IS NOT NULL
        {
                $$ = new Comparison (Operation.NE, (IExpression)$1, new Literal (null));
        }
        ;
 
 LikePredicate
-       : ColumnValue LIKE StringLiteral
+       : ArithExpr LIKE StringLiteral
        {
                $$ = new Like ((IExpression)$1, (string)$3);
        }
-       | ColumnValue NOT LIKE StringLiteral
+       | ArithExpr NOT LIKE StringLiteral
        {
                $$ = new Negation (new Like ((IExpression)$1, (string)$3));
        }
@@ -319,4 +319,4 @@ InValueList
        ;
 
 %%
-}
\ No newline at end of file
+}