connect montetdb
| 21 | |
| 22 | // connect montetdb |
| 23 | monetdb_connection::monetdb_connection(std::string &conninfo) |
| 24 | { |
| 25 | dbh = mapi_mapiuri(conninfo.c_str(), "monetdb", "monetdb", "sql"); |
| 26 | if (mapi_error(dbh)) { |
| 27 | if (dbh != NULL) { |
| 28 | mapi_explain(dbh, stderr); |
| 29 | mapi_destroy(dbh); |
| 30 | } else { |
| 31 | fprintf(stderr, "command failed\n"); |
| 32 | } |
| 33 | exit(-1); |
| 34 | } |
| 35 | mapi_reconnect(dbh); |
| 36 | if (mapi_error(dbh)) { |
| 37 | mapi_explain(dbh, stderr); |
| 38 | mapi_destroy(dbh); |
| 39 | exit(-1); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // execute queries on MonetDB |
| 44 | void monetdb_connection::q(const char* query) |
nothing calls this directly
no outgoing calls
no test coverage detected