From f22ab48f16bbebd949368ae20574c80d757b1698 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 1 Jul 2002 09:13:36 +0000 Subject: [PATCH] Bug fixed: there is an invariant that every attributed uri list must be ordered on the uri that was not enforced for the new Reference. --- helm/ocaml/mathql_interpreter/mqint.ml | 6 ++---- helm/ocaml/mathql_interpreter/pattern.ml | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index 0de53503e..5fbfc86c6 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -138,14 +138,12 @@ let rec execute_ex env = res | MQListLVar lvar -> letref_ex lvar - | MQReference l -> (* FG: *) + | MQReference l -> let rec build_result = function | [] -> [] | s :: tail -> {uri = s ; attributes = [] ; extra = ""} :: build_result tail - in build_result l - | MQMinimize l -> (* FG: sostituire con l'implementazione vera *) - execute_ex env l + in build_result (List.sort compare l) ;; (* Let's initialize the execute in Select, creating a cyclical recursion *) diff --git a/helm/ocaml/mathql_interpreter/pattern.ml b/helm/ocaml/mathql_interpreter/pattern.ml index 39c9f3c3f..576226008 100644 --- a/helm/ocaml/mathql_interpreter/pattern.ml +++ b/helm/ocaml/mathql_interpreter/pattern.ml @@ -46,6 +46,7 @@ let pattern_ex (apreamble, apattern, afragid) = in [["retVal"]] @ List.map (fun l -> [l]) (pgresult_to_string_list res)*) let qq = "select uri from registry where uri " ^ (pattern_match (apreamble, apattern, afragid)) ^ " order by registry.uri asc" in +print_endline qq ; flush stderr ; (*let _ = print_endline qq in*) let res = c#exec (qq) -- 2.39.2