4 #include "dbclient/KM3NeTDBClient.h" 
   19   static const std::string apiv2_help_t  =  
"apiv2/help";
 
   29 int main(
int argc, 
char **argv)
 
   48     JParser<> zap(
"Auxiliary program to print data from data base.");
 
   56     zap[
'A'] = 
make_field(api)        = streamds_t, apiv2_t, apiv2_help_t;
 
   64   catch(
const exception &error) {
 
   65     FATAL(error.what() << endl);
 
   72     if (api == streamds_t) {
 
   76       for (
unsigned int i = 0; i != rs.FieldCount(); ++i) {
 
   77         cout << (i != 0 ? csv : 
"") << setw(width) << left << rs.FieldName(i) << flush;
 
   82         for (
unsigned int i = 0; i != rs.FieldCount(); ++i) {
 
   83           cout << (i != 0 ? csv : 
"") << setw(width) << left << rs.GetString(i) << flush;
 
   97       to_json(js, query.c_str(), selection);
 
   99       printer(cout, js, key);
 
  102     if (api == apiv2_help_t) {
 
  112       *(
JDB::get()->APIv2Help(query.c_str())) >> js;
 
  114       printer(cout, js, key);
 
  117   catch(
const exception& error) {
 
  118     FATAL(error.what() << endl);
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
T get(const JHead &header)
Get object from header. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
ResultSet & getResultSet(const std::string &query)
Get result set. 
 
std::vector< JServer > getServernames()
Get list of names of available database servers. 
 
void to_json(json &js, const std::string &query)
Get result set. 
 
Auxiliary data structure to print (part of) JSon data.