]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/func.ml
Fun patched but works only in one direction (from the alias to the uri).
[helm.git] / helm / ocaml / mathql_interpreter / func.ml
index 1338af00899bdfd7332cdf2e047d20e23503b0f4..bd262762952c47b229a6a1c332b078446f039494 100644 (file)
@@ -34,23 +34,14 @@ 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)
+            let q = ("select objectName.uri from objectName where objectName.value = '" ^ s ^ "'") in
+            print_endline ("@@@@LA QUERY E': " ^ q);
+            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 tab tl))
 ;;