X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fhmysql%2FhSql.ml;h=ad2b5599373cea57a2839ab806f3c2f9b54ea5a0;hb=c3186d490cc27c447ee3ae5c4cf6b5d8cef0ee5d;hp=583e082a1c2dd1619c8103e0bdacad9778f73015;hpb=45591fac686d5cf947c250cec5f41a10f464aec6;p=helm.git diff --git a/helm/software/components/hmysql/hSql.ml b/helm/software/components/hmysql/hSql.ml index 583e082a1..ad2b55993 100644 --- a/helm/software/components/hmysql/hSql.ml +++ b/helm/software/components/hmysql/hSql.ml @@ -98,8 +98,7 @@ let exec (dbtype : dbtype) (dbd : dbd) (query : string) = debug_print (lazy ("EXEC: " ^ pp_dbtype dbtype ^ "|" ^ query)); let dbd = List.assoc dbtype dbd in wrap (mk (HSqlite3.exec query) (HMysql.exec query)) dbd - with Not_found -> - if dbtype = Legacy then Nothing else raise (Error "No ro or writable db") + with Not_found -> Nothing ;; let map result ~f = @@ -153,8 +152,7 @@ let escape dbtype dbd s = match List.assoc dbtype dbd with | Mysql _ | FakeMySql -> wrap HMysql.escape s | Sqlite _ -> wrap HSqlite3.escape s - with Not_found -> - if dbtype = Legacy then s else raise (Error "No ro or writable db") + with Not_found -> s ;; let escape_string_for_like dbtype dbd = @@ -163,8 +161,7 @@ let escape_string_for_like dbtype dbd = | Mysql _ | FakeMySql -> HMysql.escape_string_for_like | Sqlite _ -> HSqlite3.escape_string_for_like with Not_found -> - if dbtype = Legacy then ("ESCAPE \"\\\"" : ('a,'b,'c,'a) format4) - else raise (Error "No ro or writable db") + ("ESCAPE \"\\\"" : ('a,'b,'c,'a) format4) ;; let isMysql dbtype dbd =