From: Michal 'vorner' Vaner Date: Wed, 14 Mar 2012 14:59:10 +0000 (+0100) Subject: [1758] Make it compile X-Git-Tag: trac2351_base~226^2~116^2~100^2~10^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6bb0438548d5a7eaa6b2e7cc27f801f7c156cd8;p=thirdparty%2Fkea.git [1758] Make it compile By providing methods that throw NotImplemented. --- diff --git a/src/lib/datasrc/sqlite3_accessor.cc b/src/lib/datasrc/sqlite3_accessor.cc index a0afb7f145..23613ab0ab 100644 --- a/src/lib/datasrc/sqlite3_accessor.cc +++ b/src/lib/datasrc/sqlite3_accessor.cc @@ -587,6 +587,12 @@ SQLite3Accessor::getRecords(const std::string& name, int id, subdomains))); } +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))); diff --git a/src/lib/datasrc/sqlite3_accessor.h b/src/lib/datasrc/sqlite3_accessor.h index 08be824235..38d13d8d4c 100644 --- a/src/lib/datasrc/sqlite3_accessor.h +++ b/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 diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc index 758095b6af..b4306e4977 100644 --- a/src/lib/datasrc/tests/database_unittest.cc +++ b/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");