enabling in_predicate

This commit is contained in:
Simon Petit 2024-12-11 08:31:55 +01:00
parent 7e8c637941
commit 0206e0be00
2 changed files with 7 additions and 5 deletions

View File

@ -28,8 +28,8 @@ and predicate =
| Comparison of operator * predicand
| Between of predicand * predicand
| NotBetween of predicand * predicand
| In of string list
| NotIn of string list
| In of predicand list
| NotIn of predicand list
| Like of string
| NotLike of string
and operator =
@ -66,7 +66,7 @@ let rec pp_query fmt ast =
and pp_select s =
match s with
| Select(cols, _, _) -> pp_columns cols
| Select(cols, _, _) -> String.cat "SELECT " (pp_columns cols)
and pp_columns cols =
match cols with
@ -77,8 +77,10 @@ and pp_columns cols =
and pp_column col =
match col with
| Column(Ref(name),_) -> name
| Column(StringLiteral(name),_) -> "'"^name^"'"
| Column(DateLiteral(name),_) -> "'"^name^"'"
| Asterisk -> "*"
| _ -> failwith "not supported"
| _ -> failwith "Pretty parsing of Column not supported"
and pp_tables tables =
match tables with

View File

@ -509,8 +509,8 @@ as_clause :
predicate :
| comparison_predicate { $1 }
| in_predicate { $1 }
(* | between_predicate { $1 } *)
(* | in_predicate { $1 } *)
(* | like_predicate { $1 }*)
(*****************)