X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQIConn.mli;h=94ea83f76148895ad7db7e6f90dee400e58b9bb3;hb=0c6a5aadb1a7746681a8e26fc0b009f847c10557;hp=5e37f180af2c07a62bb4e4bf0533d683b16b5790;hpb=9e5ad471e2161436f4ff7ff56edce2947350d828;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIConn.mli b/helm/ocaml/mathql_interpreter/mQIConn.mli index 5e37f180a..94ea83f76 100644 --- a/helm/ocaml/mathql_interpreter/mQIConn.mli +++ b/helm/ocaml/mathql_interpreter/mQIConn.mli @@ -26,21 +26,30 @@ (* AUTOR: Ferruccio Guidi *) +type connection = MySQL_C of Mysql.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 -> - string -> string list -> - (bool * string * string list) list -> - (bool * string * string list) list list -> - string list list * string +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