aboutsummaryrefslogtreecommitdiff
path: root/lib/expression/query.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/expression/query.mli')
-rw-r--r--lib/expression/query.mli27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/expression/query.mli b/lib/expression/query.mli
new file mode 100644
index 0000000..fa789a9
--- /dev/null
+++ b/lib/expression/query.mli
@@ -0,0 +1,27 @@
+module QueryParameter : sig
+ (** Internaly, we need to keep a different type for the Literal chunks
+ (which requires to be quoted), and raw (which should be given as is to the
+ sql engine)
+
+ The Raw can be generated from both BindParam or NoParam queries. *)
+ type t =
+ | Literal
+ | Queue of ImportCSV.DataType.t Queue.t
+ | Raw of t
+end
+
+type _ binded_query =
+ | BindParam : ImportCSV.DataType.t Queue.t binded_query
+ | NoParam : unit binded_query
+
+val query_of_expression :
+ 'b binded_query ->
+ Format.formatter ->
+ (Format.formatter -> 'a -> unit) ->
+ 'a T.t ->
+ 'b
+
+module Query :
+ Sym.SYM_EXPR
+ with type 'a obs = Format.formatter -> nested:QueryParameter.t -> unit
+ and type 'a path_repr = Format.formatter -> 'a -> unit