From b2bde540ce5ec2c8731f0353815583bd3d4eba26 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 24 Feb 2004 16:16:31 +0000 Subject: [PATCH] interpreter flags were reorganized --- helm/ocaml/mathql_interpreter/mQIProperty.ml | 2 +- helm/ocaml/mathql_interpreter/mQueryInterpreter.ml | 6 ++++-- helm/ocaml/mathql_interpreter/mQueryStandard.ml | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/mQIProperty.ml b/helm/ocaml/mathql_interpreter/mQIProperty.ml index 1e634d7c1..a8b2e028d 100644 --- a/helm/ocaml/mathql_interpreter/mQIProperty.ml +++ b/helm/ocaml/mathql_interpreter/mQIProperty.ml @@ -58,7 +58,7 @@ let cl_print l = let pg_query h table cols ct cfl = let exec q = - if C.set h C.Log then C.log h (q ^ "\n"); + if C.set h C.Queries then C.log h (q ^ "\n"); P.exec (C.pgc h) q in let rec iter f sep = function diff --git a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml index 57e1207bc..e387c7fb9 100644 --- a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml +++ b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml @@ -154,7 +154,7 @@ let execute h x = let t = P.start_time () in let r = MQIProperty.exec h q1 subj cons_true cons_false exp in let s = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "Property: %s,%i\n" s (U.count r)); c, r | M.Select (i, x, y) -> @@ -188,9 +188,11 @@ let execute h x = in let c = {svars = []; avars = []; groups = []} in let t = P.start_time () in + if C.set h C.Source then F.text_of_query (C.log h) "\n" x; let _, r = eval_query c x in + if C.set h C.Result then F.text_of_result (C.log h) "\n" r; let s = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "MQIExecute: %s,%s\n" s (C.string_of_flags (C.flags h))); r diff --git a/helm/ocaml/mathql_interpreter/mQueryStandard.ml b/helm/ocaml/mathql_interpreter/mQueryStandard.ml index 85a7ffe40..02fafb655 100644 --- a/helm/ocaml/mathql_interpreter/mQueryStandard.ml +++ b/helm/ocaml/mathql_interpreter/mQueryStandard.ml @@ -160,14 +160,14 @@ let log_fun xml src = let log_src e o x = let t = P.start_time () in o.L.s_query x; let s = P.stop_time t in - if C.set e.L.conn C.Stat then o.L.s_out (Printf.sprintf "Log source: %s\n" s); + if C.set e.L.conn C.Times then o.L.s_out (Printf.sprintf "Log source: %s\n" s); e.L.eval x in let log_res e o x = let s = e.L.eval x in let t = P.start_time () in o.L.s_result s; let r = P.stop_time t in - if C.set e.L.conn C.Stat then o.L.s_out (Printf.sprintf "Log: %s\n" r); s + if C.set e.L.conn C.Times then o.L.s_out (Printf.sprintf "Log: %s\n" r); s in let txt_log o = if xml then o.L.s_out "xml "; -- 2.39.2