Ignore:
Timestamp:
2008-05-17T16:00:00+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Changed lots of "gdbm"s to "db"s, in preparation for adding new DB types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/colservr/queryfilter.cpp

    r12871 r15558  
    3131
    3232// translate will return true if successful
    33 bool queryfilterclass::translate (gdbmclass *gdbmptr, int docnum, text_t &trans_OID) {
     33bool queryfilterclass::translate (dbclass *db_ptr, int docnum, text_t &trans_OID) {
    3434  infodbclass info;
    3535
     
    3737
    3838  // get the info
    39   if (gdbmptr == NULL) return false;
    40   if (!gdbmptr->getinfo(docnum, info)) return false;
     39  if (db_ptr == NULL) return false;
     40  if (!db_ptr->getinfo(docnum, info)) return false;
    4141
    4242  // translate
     
    187187
    188188queryfilterclass::queryfilterclass () {
    189   gdbmptr = NULL;
     189  db_ptr = NULL;
    190190  textsearchptr = NULL;
    191191  maxnumeric = 4;
     
    326326
    327327queryfilterclass::~queryfilterclass () {
    328   // don't delete gdbmptr or mgsearchptr here, they'll
     328  // don't delete db_ptr or mgsearchptr here, they'll
    329329  // be cleaned up by mggdbmsource
    330330}
     
    409409    indexstem = collection;
    410410  }
    411   gdbm_filename = filename_cat(gdbmhome, "collect", collection, "index", "text", indexstem);
    412 
    413   if (littleEndian()) gdbm_filename += ".ldb";
    414   else gdbm_filename += ".bdb";
    415 
    416   if (!file_exists(gdbm_filename)) {
     411  db_filename = filename_cat(gdbmhome, "collect", collection, "index", "text", indexstem);
     412
     413  if (littleEndian()) db_filename += ".ldb";
     414  else db_filename += ".bdb";
     415
     416  if (!file_exists(db_filename)) {
    417417    logout << text_t2ascii
    418        << "warning: gdbm database \"" //****
    419        << gdbm_filename << "\" does not exist\n\n";
    420     //return false; //****
     418       << "warning: database \"" << db_filename << "\" does not exist\n\n";
     419    //return false;
    421420  }
    422421
Note: See TracChangeset for help on using the changeset viewer.