Util.h
Go to the documentation of this file.
1 #ifndef __DBIUTIL_HPP_
2 #define __DBIUTIL_HPP_
3 
4 #include <string>
5 #include <ctime>
6 
7 namespace nutools {
8  namespace dbi {
9 
10  /**
11  * Generalized Database Table Interface Utilities
12  *
13  * @author Jonathan Paley
14  * @version $Id: Util.h,v 1.9 2011/08/08 16:03:04 jpaley Exp $
15  */
16  class Util
17  {
18  public:
19 
20  static bool CheckConnection(std::string dbname,
22  std::string user = "",
23  std::string port = "");
28  static bool TimeAsStringToTime_t(std::string ts, time_t& t);
29  static bool DateAsStringToTime_t(std::string date, time_t& t);
30  static bool RunningOnGrid();
31  };
32 
33  } // namespace dbi close
34 } // namespace nova close
35 
36 #endif
static bool RunningOnGrid()
Definition: Util.cpp:132
std::string string
Definition: nybbler.cc:12
static std::string GetCurrentTimeAsString()
Definition: Util.cpp:42
Simple service to provide a RunHistory configured to the right run.
Definition: Column.cpp:14
static std::string GetFarFutureTimeAsString()
Definition: Util.cpp:75
static bool CheckConnection(std::string dbname, std::string server, std::string user="", std::string port="")
Definition: Util.cpp:13
static std::string GetFarPastTimeAsString()
Definition: Util.cpp:70
static bool TimeAsStringToTime_t(std::string ts, time_t &t)
Definition: Util.cpp:81
static bool DateAsStringToTime_t(std::string date, time_t &t)
Definition: Util.cpp:106
static std::string GetCurrentDateAsString()
Definition: Util.cpp:56