[libgda: 1/5] sql-parser: removed warning at composing two keywords



commit c71ad2201217f6b42df6ae1a6d3c7b77549d4332
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Thu Feb 21 10:41:44 2019 -0600

    sql-parser: removed warning at composing two keywords

 libgda/sql-parser/gda-sql-parser.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libgda/sql-parser/gda-sql-parser.c b/libgda/sql-parser/gda-sql-parser.c
index 53ccdfac0..935e40d9f 100644
--- a/libgda/sql-parser/gda-sql-parser.c
+++ b/libgda/sql-parser/gda-sql-parser.c
@@ -1501,9 +1501,11 @@ getToken (GdaSqlParser *parser)
        else if (priv->context->token_type == L_IS)
                handle_composed_2_keywords (parser, retval, L_NULL, L_ISNULL);
        else if (priv->context->token_type == L_NOT) {
-               handle_composed_2_keywords (parser, retval, L_NULL, L_NOTNULL) ||
-                       handle_composed_2_keywords (parser, retval, L_LIKE, L_NOTLIKE) ||
-                       handle_composed_2_keywords (parser, retval, L_ILIKE, L_NOTILIKE);
+               if (!handle_composed_2_keywords (parser, retval, L_NULL, L_NOTNULL)) {
+                       if (!handle_composed_2_keywords (parser, retval, L_LIKE, L_NOTLIKE)) {
+                               handle_composed_2_keywords (parser, retval, L_ILIKE, L_NOTILIKE);
+                       }
+               }
        }
        else if (priv->context->token_type == L_SIMILAR)
                handle_composed_2_keywords (parser, retval, L_TO, L_SIMILAR);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]