From 1bf8a62a30bd64ba0f194d88d9feb0ef7abcce5b Mon Sep 17 00:00:00 2001 From: Steven Murray <steven.murray@cern.ch> Date: Fri, 20 May 2016 18:09:33 +0200 Subject: [PATCH] SqliteRset now inherits from DbRset --- catalogue/SqliteRset.hpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/catalogue/SqliteRset.hpp b/catalogue/SqliteRset.hpp index 3733b22ad1..d9c18c1e41 100644 --- a/catalogue/SqliteRset.hpp +++ b/catalogue/SqliteRset.hpp @@ -18,6 +18,8 @@ #pragma once +#include "catalogue/DbRset.hpp" + #include <memory> #include <stdint.h> #include <sqlite3.h> @@ -33,7 +35,7 @@ class SqliteStmt; /** * The result set of an sql query. */ -class SqliteRset { +class SqliteRset: public DbRset { public: /** @@ -56,18 +58,18 @@ public: * * @return The SQL statement. */ - const char *getSql() const; + virtual const char *getSql() const; /** * Attempts to get the next row of the result set. * - * Please note that this method will delete the memory asscoiated with any + * Please note that this method will delete the memory associated with any * C-strings returned by the columnText() method. * * @return True if a row has been retrieved else false if there are no more * rows in the result set. */ - bool next(); + virtual bool next(); /** * Returns true if the specified column contains a null value. @@ -75,7 +77,7 @@ public: * @param colName The name of the column. * @return True if the specified column contains a null value. */ - bool columnIsNull(const char *const colName) const; + virtual bool columnIsNull(const char *const colName) const; /** * Returns the value of the specified column as a string. @@ -94,7 +96,7 @@ public: * the next call to the next() method. The SqliteRset class is responsible * for freeing the memory. */ - const char *columnText(const char *const colName) const; + virtual const char *columnText(const char *const colName) const; /** * Returns the value of the specified column as an integer. @@ -102,7 +104,7 @@ public: * @param colName The name of the column. * @return The value of the specified column. */ - uint64_t columnUint64(const char *const colName) const; + virtual uint64_t columnUint64(const char *const colName) const; private: -- GitLab