X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2Ffunc.ml;h=7e1f22367d3ee88f669564ef92174ca0481f084e;hb=d59d2f93956bcbe4dd7bb3407e3c53de8b66c003;hp=1338af00899bdfd7332cdf2e047d20e23503b0f4;hpb=ba824e867afc3eaf081ed1a1d6526d421242a6a0;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/func.ml b/helm/ocaml/mathql_interpreter/func.ml index 1338af008..7e1f22367 100644 --- a/helm/ocaml/mathql_interpreter/func.ml +++ b/helm/ocaml/mathql_interpreter/func.ml @@ -27,30 +27,19 @@ * *) -open Dbconn;; open Utility;; open Intersect;; (* * implementazione delle funzioni dublin core *) -let rec func_dc tab outv inv = function +let rec fun_ex handle 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) + let c = MQIConn.pgc handle in + let q = ("select " ^ tab ^ ".uri from " ^ tab ^ " where " ^ tab ^ ".value = '" ^ 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 - | _ -> [] + append (res,(fun_ex handle tab tl)) ;;