Index: /gsdl/trunk/lib/dbclass.cpp
===================================================================
--- /gsdl/trunk/lib/dbclass.cpp	(revision 15651)
+++ /gsdl/trunk/lib/dbclass.cpp	(revision 15652)
@@ -29,4 +29,12 @@
 
 dbclass::~dbclass() {}
+
+
+// May be overwritten by subclasses; returns true if exists
+bool dbclass::exists (const text_t& key)
+{
+  text_t data;
+  return getkeydata (key, data);
+}
 
 
Index: /gsdl/trunk/lib/dbclass.h
===================================================================
--- /gsdl/trunk/lib/dbclass.h	(revision 15651)
+++ /gsdl/trunk/lib/dbclass.h	(revision 15652)
@@ -54,23 +54,23 @@
   virtual ~dbclass();
 
-  // Must be implemented by subclasses; returns true if opened
+  // MUST be implemented by subclasses; returns true if opened
   virtual bool opendatabase (const text_t &filename, int mode, int num_retrys, bool need_filelock) = 0;
 
-  // Must be implemented by subclasses
+  // MUST be implemented by subclasses
   virtual void closedatabase () = 0;
 
-  // Must be implemented by subclasses
+  // MUST be implemented by subclasses
   virtual void deletekey (const text_t &key) = 0;
 
-  // Must be implemented by subclasses; returns true if exists
-  virtual bool exists (const text_t& key) = 0;
+  // May be overwritten by subclasses; returns true if exists
+  virtual bool exists (const text_t& key);
 
   // Must be implemented by subclasses; returns true on success
   virtual bool getinfo (const text_t& key, infodbclass &info) = 0;
 
-  // Must be implemented by subclasses; returns true on success
+  // MUST be implemented by subclasses; returns true on success
   virtual bool getkeydata (const text_t& key, text_t &data) = 0;
 
-  // Must be implemented by subclasses; returns array of keys
+  // MUST be implemented by subclasses; returns array of keys
   virtual text_tarray getkeys () = 0;
 
@@ -78,5 +78,5 @@
   virtual bool setinfo (const text_t &key, const infodbclass &info) = 0;
 
-  // Must be implemented by subclasses; returns true on success
+  // MUST be implemented by subclasses; returns true on success
   virtual bool setkeydata (const text_t &key, const text_t &data) = 0;
 
Index: /gsdl/trunk/lib/gdbmclass.cpp
===================================================================
--- /gsdl/trunk/lib/gdbmclass.cpp	(revision 15651)
+++ /gsdl/trunk/lib/gdbmclass.cpp	(revision 15652)
@@ -112,12 +112,4 @@
   // free up the key memory
   delete []key_data.dptr;
-}
-
-
-// returns true if exists
-bool gdbmclass::exists (const text_t& key)
-{
-  text_t data;
-  return getkeydata (key, data);
 }
 
Index: /gsdl/trunk/lib/gdbmclass.h
===================================================================
--- /gsdl/trunk/lib/gdbmclass.h	(revision 15651)
+++ /gsdl/trunk/lib/gdbmclass.h	(revision 15652)
@@ -62,7 +62,4 @@
   void deletekey (const text_t &key);
 
-  // returns true if exists
-  bool exists (const text_t& key);
-
   // returns true on success
   bool getinfo (const text_t& key, infodbclass &info);
Index: /gsdl/trunk/lib/sqlitedbclass.cpp
===================================================================
--- /gsdl/trunk/lib/sqlitedbclass.cpp	(revision 15651)
+++ /gsdl/trunk/lib/sqlitedbclass.cpp	(revision 15652)
@@ -86,18 +86,4 @@
   text_t sql_cmd = "DELETE FROM data WHERE key='" + key + "'";
   sqlexec(sql_cmd);
-}
-
-
-// returns true if exists
-bool sqlitedbclass::exists (const text_t& key)
-{
-  text_t sql_cmd = "SELECT value FROM data WHERE key='" + key + "'";
-  vector<text_tmap> sql_results;
-  if (!sqlgetarray(sql_cmd, sql_results) || sql_results.size() == 0)
-  {
-    return false;
-  }
-
-  return true;
 }
 
Index: /gsdl/trunk/lib/sqlitedbclass.h
===================================================================
--- /gsdl/trunk/lib/sqlitedbclass.h	(revision 15651)
+++ /gsdl/trunk/lib/sqlitedbclass.h	(revision 15652)
@@ -45,7 +45,4 @@
   void deletekey (const text_t &key);
 
-  // returns true if exists
-  bool exists (const text_t& key);
-
   // returns true on success
   bool getinfo (const text_t& key, infodbclass &info);
