From 80f9d59bbf55d9748696276b74a41ef079efc56b Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 22 Oct 2002 11:20:08 +0000 Subject: [PATCH] mqint.ml patched --- helm/ocaml/mathql_interpreter/mqint.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index 8062b11e6..54dc0e05c 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -67,10 +67,8 @@ let galax_db = "galax" let dbname = ref postgres_db let set_database s = - match s with - postgres_db -> dbname := s - | galax_db -> dbname := s - | _ -> raise (Invalid_argument s) + if s = postgres_db || s = galax_db then dbname := s + else raise (Invalid_argument s) let get_database () = ! dbname @@ -123,7 +121,7 @@ let rec exec_set_exp c = function res | MathQL.Relation (rop, path, sexp, attl) -> let before = Sys.time() in - if ! dbname = "db-postgres" then + if ! dbname = postgres_db then (let res = relation_ex rop path (exec_set_exp c sexp) attl in if ! stat then (print_string ("RELATION " ^ (List.hd path) ^ " = " ^ string_of_int(List.length res) ^ ": "); -- 2.39.2