X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmathql_interpreter%2Ffunc.ml;h=921a85da5eab56f24f63b542eaca3d3e5f0bef12;hb=dc9aab4ebfab88492cbaef935c79221f648d8313;hp=1338af00899bdfd7332cdf2e047d20e23503b0f4;hpb=86122a3ce11bdf45ecb93f8f7efaffa49bd31fa2;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/func.ml b/helm/ocaml/mathql_interpreter/func.ml index 1338af008..921a85da5 100644 --- a/helm/ocaml/mathql_interpreter/func.ml +++ b/helm/ocaml/mathql_interpreter/func.ml @@ -34,23 +34,17 @@ open Intersect;; (* * implementazione delle funzioni dublin core *) -let rec func_dc tab outv inv = function +let rec fun_ex tab = function [] -> [] - | s::tl -> let res = - let c = pgc () in - let q = ("select " ^ tab ^ "." ^ outv ^ " from " ^ tab ^ " where " ^ tab ^ "." ^ inv ^ " = '" ^ s ^ "'") in - pgresult_to_string_list (c#exec q) - in - append (res,(func_dc tab outv inv tl)) -;; - -(* - * - *) -let fun_ex f value = - match f with - "name" -> func_dc "names" "name" "uri" value - | "reference" -> func_dc "names" "uri" "name" value - | _ -> [] + | s::tl -> + let res = + let c = pgc () in + let q = + "select objectName.uri from objectName where objectName.value = '" ^ + s ^ "'" + in + pgresult_to_string_list (c#exec q) + in + append (res,(fun_ex tab tl)) ;;