X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQIConn.mli;h=35c8b3ef002087b54a86de8c5ddfbaa99261cfde;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=fba3d4263388b9ab8eda2cad7eaa59b4e5238106;hpb=b5503c72c5560e8da3337e99bf058f0caab350e8;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIConn.mli b/helm/ocaml/mathql_interpreter/mQIConn.mli index fba3d4263..35c8b3ef0 100644 --- a/helm/ocaml/mathql_interpreter/mQIConn.mli +++ b/helm/ocaml/mathql_interpreter/mQIConn.mli @@ -26,16 +26,30 @@ (* AUTOR: Ferruccio Guidi *) +type connection = MySQL_C of HMysql.dbd + | Postgres_C of Postgres.connection + | No_C + type flag = Galax | Postgres | Queries | Result | Source | Times | Warn +type handle = { + log : string -> unit; (* logging function *) + set : flag list; (* options *) + pgc : connection; (* PG connection *) + pgm : MQIMap.pg_map; (* PG conversion function *) + pga : MQIMap.pg_alias (* PG table aliases *) +} + val string_of_flags : flag list -> string val flags_of_string : string -> flag list -type handle - val init : ?flags:(flag list) -> ?log:(string -> unit) -> unit -> handle val close : handle -> unit val connected : handle -> bool +val exec : handle -> (MQITypes.query -> unit) -> + MQITypes.table -> MQITypes.columns -> + string MQITypes.con_true -> string MQITypes.con_false -> + MQITypes.result val init_if_connected : ?flags:(flag list) -> ?log:(string -> unit) -> unit -> handle @@ -45,7 +59,6 @@ val init_if_connected : ?flags:(flag list) -> ?log:(string -> unit) -> unit -> h val log : handle -> string -> unit val set : handle -> flag -> bool -val pgc : handle -> MQIDataBase.connection option val flags : handle -> flag list val tables : handle -> MathQL.path -> MQIMap.pg_tables val field : handle -> MathQL.path -> string -> string