diff --git a/lib/ast.ml b/lib/ast.ml index 0ca1ec5..5b3b884 100644 --- a/lib/ast.ml +++ b/lib/ast.ml @@ -1,6 +1,6 @@ type query = Query of select_stmt and select_stmt = - | Select of column list * table list + | Select of column list * table list * filter option and column = | Asterisk | Column of string @@ -27,6 +27,7 @@ and predicate = | In of string list | NotIn of string list | Like of string + | NotLike of string and operator = | Equals | NotEquals @@ -35,19 +36,17 @@ and operator = | LessEquals | GreaterEquals and filter = - | Filter of string + | Filter of condition and search_condition = | Search of string - - let rec pp_query fmt ast = match ast with | Query(s) -> Format.fprintf fmt "%s" (pp_select s) and pp_select s = match s with - | Select(cols, _) -> pp_columns cols + | Select(cols, _, _) -> pp_columns cols and pp_columns cols = match cols with @@ -81,4 +80,3 @@ and pp_join_type j = | Union -> "union" | Natural -> "natural" -