let default_confirm q =
let module Util = MQueryUtil in
if ! show_queries then print_string (Util.text_of_query q ^ nl);
- check_db ()
+ let b = check_db () in
+ if ! db_down then print_endline "db_down"; b
let get_terms () =
let terms = ref [] in
*)
in print_endline s; flush stdout
+let dbc () =
+ let on = check_db () in
+ if on then ignore (Mqint.check ())
+
let rec display = function
| [] -> ()
| term :: tail ->
prerr_endline "OPTIONS:\n";
prerr_endline "-h -help shows this help message";
prerr_endline "-q -show-queries outputs the generated queries";
+ prerr_endline "-c -db-check checks the database connection";
prerr_endline "-r -restricted -nodb enables restricted mode: queries are not issued";
prerr_endline "-t -typeof URI outputs the CIC type of the given HELM object";
prerr_endline "-x -execute issues a query given in the input file";
| ("-x"|"-execute") :: rem -> execute stdin; parse rem
| ("-q"|"-show-queries") :: rem -> show_queries := true; parse rem
| ("-r"|"-restricted"|"-nodb") :: rem -> use_db := false; parse rem
+ | ("-c"|"-db-check") :: rem -> dbc (); parse rem
| ("-L"|"-locate") :: arg :: rem -> locate arg; parse rem
| ("-B"|"-backward") :: arg :: rem ->
let m = (int_of_string arg) in