1 // Z39.50 Result Set class
10 resultSet::resultSet(connection &c, const query &q) : owner(c) {
11 ZOOM_connection yazc = c._getYazConnection();
12 rs = ZOOM_connection_search(yazc, q._getYazQuery());
14 const char *errmsg; // unused: carries same info as `errcode'
17 if ((errcode = ZOOM_connection_error(yazc, &errmsg, &addinfo)) != 0) {
18 ZOOM_resultset_destroy(rs);
19 throw bib1Exception(errcode, addinfo);
23 resultSet::~resultSet() {
24 ZOOM_resultset_destroy(rs);
27 std::string resultSet::option(const std::string &key) const {
28 return ZOOM_resultset_option_get(rs, key.c_str());
31 bool resultSet::option(const std::string &key, const std::string &val) {
32 ZOOM_resultset_option_set(rs, key.c_str(), val.c_str());
36 size_t resultSet::size() const {
37 return ZOOM_resultset_size(rs);
43 * c-file-style: "Stroustrup"
44 * indent-tabs-mode: nil
46 * vim: shiftwidth=4 tabstop=8 expandtab