method private _check_gui_query q =
    let q = { SQL_db.qry_name = q.QGUI.qrygi_name ;
              SQL_db.qry_db   = db ;
              SQL_db.qry_comment = "" ;
              SQL_db.qry_query = q.QGUI.qrygi_query ;
            }
    in
    match SQL_db.query_state q with
      SQL_db.Query_ok _ -> ()
    | state ->
        let s = SQL_db.string_of_query_state state in
        raise (Invalid_input s)