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 =
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 =
| 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 =