- let tv = pgresult_to_string (c#exec ("select distinct id from registry where uri='" ^ s ^ "' order by id")) in
+ let quoted_s =
+ Str.global_substitute (Str.regexp "'")
+ (function _ -> "\\'") s in
+ let tv = pgresult_to_string (c#exec ("select distinct id from registry where uri='" ^ quoted_s ^ "' order by id")) in
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
- let q = ("select distinct h" ^ mprop ^ "." ^ prop ^" from h" ^ mprop ^ " where h" ^ mprop ^ ".uri = '" ^ s ^ "' order by h" ^ mprop ^ "." ^ prop) in
+ let quoted_s =
+ Str.global_substitute (Str.regexp "'")
+ (function _ -> "\\'") s in
+ let q = ("select distinct h" ^ mprop ^ "." ^ prop ^" from h" ^ mprop ^ " where h" ^ mprop ^ ".uri = '" ^ quoted_s ^ "' order by h" ^ mprop ^ "." ^ prop) in
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
| _ -> (* metadati DC !!!! Controllare se i nomi delle tabelle cominciano con h !!!!*)
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
| _ -> (* metadati DC !!!! Controllare se i nomi delle tabelle cominciano con h !!!!*)
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
else
let res =
let c = pgc () in
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
else
let res =
let c = pgc () in
- let q = ("select " ^ mprop ^ ".value from " ^ mprop ^ " where " ^ mprop ^ ".uri = '" ^ s ^ "'") in
+ let quoted_s =
+ Str.global_substitute (Str.regexp "'")
+ (function _ -> "\\'") s in
+ let q = ("select " ^ mprop ^ ".value from " ^ mprop ^ " where " ^ mprop ^ ".uri = '" ^ quoted_s ^ "'") in
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))
pgresult_to_string_list (c#exec q)
in
append (res,(property_ex rop path inv tl))