Browse Source

[1758] Make it compile

By providing methods that throw NotImplemented.
Michal 'vorner' Vaner 13 years ago
parent
commit
c6bb043854

+ 6 - 0
src/lib/datasrc/sqlite3_accessor.cc

@@ -588,6 +588,12 @@ SQLite3Accessor::getRecords(const std::string& name, int id,
 }
 
 DatabaseAccessor::IteratorContextPtr
+SQLite3Accessor::getNSEC3Records(const std::string&, int) const {
+    // TODO: Implement
+    isc_throw(NotImplemented, "Not implemented yet, see ticket #1760");
+}
+
+DatabaseAccessor::IteratorContextPtr
 SQLite3Accessor::getAllRecords(int id) const {
     return (IteratorContextPtr(new Context(shared_from_this(), id)));
 }

+ 8 - 0
src/lib/datasrc/sqlite3_accessor.h

@@ -141,6 +141,14 @@ public:
                                           int id,
                                           bool subdomains = false) const;
 
+    /// \brief Look up NSEC3 records for the given hash
+    ///
+    /// This implements the getNSEC3Records of DatabaseAccessor.
+    ///
+    /// \todo Actually implement, currently throws NotImplemented.
+    virtual IteratorContextPtr getNSEC3Records(const std::string& hash,
+                                               int id) const;
+
     /** \brief Look up all resource records for a zone
      *
      * This implements the getRecords() method from DatabaseAccessor

+ 6 - 1
src/lib/datasrc/tests/database_unittest.cc

@@ -251,11 +251,16 @@ public:
 
     virtual IteratorContextPtr getRecords(const std::string&, int, bool)
         const
-        {
+    {
         isc_throw(isc::NotImplemented,
                   "This database datasource can't be iterated");
     }
 
+    virtual IteratorContextPtr getNSEC3Records(const std::string&, int) const {
+        isc_throw(isc::NotImplemented, "This test database datasource won't "
+                  "give you any NSEC3. Ever. Ask someone else.");
+    }
+
     virtual IteratorContextPtr getAllRecords(int) const {
         isc_throw(isc::NotImplemented,
                   "This database datasource can't be iterated");