]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/property.ml
objectName patched.
[helm.git] / helm / ocaml / mathql_interpreter / property.ml
index 6052c2072842ee14caecda71d660082def1a1621..071d2884c74a86147445a2a35f8e34a3b7edb888 100644 (file)
@@ -44,7 +44,11 @@ let rec property_ex rop path inv = function
     [] -> []
   | s::tl -> let mprop = fst path in
              print_endline mprop;
-             let prop = List.hd (snd path) in
+             let l_sub_p = snd path in
+              
+            let prop = (if (l_sub_p <> []) then List.hd l_sub_p 
+                       else "") 
+            in 
              match mprop with
               
               "refObj" (* in base al valore di prop restituisco i valori del relativo campo della tabella relativa all'uri rappresentata da s *)
@@ -85,11 +89,13 @@ let rec property_ex rop path inv = function
             
             
             | _ ->        (* metadati DC  !!!! Controllare se i nomi delle tabelle cominciano con h !!!!*)
+            print_endline "DC";
             if inv then
                let res =
                let c = pgc () in
               let q = ("select " ^ mprop ^ ".uri from " ^ mprop ^ " where " ^ mprop ^ ".value = '" ^ s ^ "'") in
-                pgresult_to_string_list (c#exec q)
+                print_endline q;
+                pgresult_to_string_list (c#exec q)
                in
                  append (res,(property_ex rop path inv tl))
              else