BIND 10 trac1062, updated. 2b6bcb84a17fc98ea0ea87df65e6a77829857ecd [trac1062] doxygen update

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Aug 5 18:56:26 UTC 2011


The branch, trac1062 has been updated
       via  2b6bcb84a17fc98ea0ea87df65e6a77829857ecd (commit)
      from  cc6d6b14603924a4ef2d86dfaf758447cca6a7ff (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2b6bcb84a17fc98ea0ea87df65e6a77829857ecd
Author: Jelte Jansen <jelte at isc.org>
Date:   Fri Aug 5 20:56:19 2011 +0200

    [trac1062] doxygen update

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/database.cc               |    2 +-
 src/lib/datasrc/database.h                |    8 +++++++-
 src/lib/datasrc/sqlite3_connection.cc     |    9 +++++----
 src/lib/datasrc/sqlite3_connection.h      |   23 +++++++++++++++++++++++
 src/lib/dns/tests/rdata_rrsig_unittest.cc |    1 -
 5 files changed, 36 insertions(+), 7 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index 3002056..c3f67cd 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -74,7 +74,7 @@ namespace {
     // created with the given name, class, type and ttl
     // The type is checked if the rrset exists, but the
     // name is not.
-    // 
+    //
     // Then adds the given rdata to the set
     //
     // Raises a DataSourceError if the type does not
diff --git a/src/lib/datasrc/database.h b/src/lib/datasrc/database.h
index 5498694..d82c86f 100644
--- a/src/lib/datasrc/database.h
+++ b/src/lib/datasrc/database.h
@@ -75,6 +75,12 @@ public:
     /**
      * \brief Starts a new search for records of the given name in the given zone
      *
+     * The data searched by this call can be retrieved with subsequent calls to
+     * getNextRecord().
+     *
+     * \exception DataSourceError if there is a problem connecting to the
+     *                            backend database
+     *
      * \param zone_id The zone to search in, as returned by getZone()
      * \param name The name of the records to find
      */
@@ -169,7 +175,7 @@ public:
          *       target again for that, but it might also use something
          *       different. It is left in for compatibility at the moment.
          * \note options are ignored at this moment
-         * 
+         *
          * \exception DataSourceError when there is a problem reading
          *                            the data from the dabase backend.
          *                            This can be a connection, code, or
diff --git a/src/lib/datasrc/sqlite3_connection.cc b/src/lib/datasrc/sqlite3_connection.cc
index fa5f831..70adde4 100644
--- a/src/lib/datasrc/sqlite3_connection.cc
+++ b/src/lib/datasrc/sqlite3_connection.cc
@@ -351,19 +351,20 @@ SQLite3Connection::getNextRecord(std::vector<std::string>& columns) {
             columns.push_back(convertToPlainChar(sqlite3_column_text(
                                                  current_stmt, column)));
         }
-        return true;
+        return (true);
     } else if (rc == SQLITE_DONE) {
         // reached the end of matching rows
         sqlite3_reset(current_stmt);
         sqlite3_clear_bindings(current_stmt);
-        return false;
+        return (false);
     }
     sqlite3_reset(current_stmt);
     sqlite3_clear_bindings(current_stmt);
-    isc_throw(DataSourceError, "Unexpected failure in sqlite3_step");
+    isc_throw(DataSourceError,
+              "Unexpected failure in sqlite3_step (sqlite result code " << rc << ")");
 
     // Compilers might not realize isc_throw always throws
-    return false;
+    return (false);
 }
 
 }
diff --git a/src/lib/datasrc/sqlite3_connection.h b/src/lib/datasrc/sqlite3_connection.h
index ca41a06..ffb2470 100644
--- a/src/lib/datasrc/sqlite3_connection.h
+++ b/src/lib/datasrc/sqlite3_connection.h
@@ -88,7 +88,30 @@ public:
      *     element and the zone id in the second if it was.
      */
     virtual std::pair<bool, int> getZone(const isc::dns::Name& name) const;
+
+    /**
+     * \brief Start a new search for the given name in the given zone.
+     *
+     * This implements the searchForRecords from DatabaseConnection.
+     * This particular implementation does not raise DataSourceError.
+     *
+     * \param zone_id The zone to seach in, as returned by getZone()
+     * \param name The name to find records for
+     */
     virtual void searchForRecords(int zone_id, const std::string& name);
+
+    /**
+     * \brief Retrieve the next record from the search started with
+     *        searchForRecords
+     *
+     * This implements the getNextRecord from DatabaseConnection.
+     * See the documentation there for more information.
+     *
+     * \param columns This vector will be cleared, and the fields of the record will
+     *                be appended here as strings (in the order rdtype, ttl, sigtype,
+     *                and rdata). If there was no data, the vector is untouched.
+     * \return true if there was a next record, false if there was not
+     */
     virtual bool getNextRecord(std::vector<std::string>& columns);
 private:
     /// \brief Private database data
diff --git a/src/lib/dns/tests/rdata_rrsig_unittest.cc b/src/lib/dns/tests/rdata_rrsig_unittest.cc
index ad49f76..3324b99 100644
--- a/src/lib/dns/tests/rdata_rrsig_unittest.cc
+++ b/src/lib/dns/tests/rdata_rrsig_unittest.cc
@@ -48,7 +48,6 @@ TEST_F(Rdata_RRSIG_Test, fromText) {
     generic::RRSIG rdata_rrsig(rrsig_txt);
     EXPECT_EQ(rrsig_txt, rdata_rrsig.toText());
     EXPECT_EQ(isc::dns::RRType::A(), rdata_rrsig.typeCovered());
-
 }
 
 TEST_F(Rdata_RRSIG_Test, badText) {




More information about the bind10-changes mailing list