- let init m =
- let default_connection_string =
- "host=mowgli.cs.unibo.it dbname=helm_mowgli_new_schema user=helm"
- in
- let connection_string =
- try Sys.getenv "POSTGRESQL_CONNECTION_STRING"
- with Not_found -> default_connection_string
- in
- if String.contains m galax_char then true else
- try Dbconn.init connection_string; true
- with ConnectionFailed s -> false
-
- let close m =
- if String.contains m galax_char then () else Dbconn.close ()
-
- let check m =
- if String.contains m galax_char then false else
- try ignore (Dbconn.pgc ()); true with InvalidConnection -> false
-
- end