From 2f9e86d966ef765b9eff2483983ff1fe635bb138 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 14 Oct 2009 15:05:15 +0000 Subject: [PATCH] ... --- helm/software/components/hmysql/hSql.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 = -- 2.39.2