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/mgqueryfilter.cpp

    r13780 r15558  
    170170    docresultmap::iterator docs_end = queryresults.docs.docset.end();
    171171    while (docs_here != docs_end) {
    172       if (OID_phrase_search (*((mgsearchclass*)textsearchptr), *gdbmptr, queryparams.index,
     172      if (OID_phrase_search (*((mgsearchclass*)textsearchptr), *db_ptr, queryparams.index,
    173173                 queryparams.subcollection, queryparams.language,
    174174                 longindex, queryparams.collection, *this_phrase,
     
    187187
    188188// do query that might involve multiple sub queries
    189 // mgsearchptr and gdbmptr are assumed to be valid
     189// mgsearchptr and db_ptr are assumed to be valid
    190190void mgqueryfilterclass::do_multi_query (const FilterRequest_t &request,
    191191                       const vector<queryparamclass> &query_params,
     
    297297  response.clear ();
    298298  err = noError;
    299   if (gdbmptr == NULL) {
     299  if (db_ptr == NULL) {
    300300    // most likely a configuration problem
    301301    logout << text_t2ascii
    302        << "configuration error: mgqueryfilter contains a null gdbmclass\n\n";
     302       << "configuration error: mgqueryfilter contains a null dbclass\n\n";
    303303    err = configurationError;
    304304    return;
     
    313313
    314314  // open the database
    315   gdbmptr->setlogout(&logout);
    316   if (!gdbmptr->opendatabase (gdbm_filename, GDBM_READER, 100, false)) {
    317     // most likely a system problem (we have already checked that the
    318     // gdbm database exists)
     315  db_ptr->setlogout(&logout);
     316  if (!db_ptr->opendatabase (db_filename, DB_READER, 100, false)) {
     317    // most likely a system problem (we have already checked that the database exists)
    319318    logout << text_t2ascii
    320        << "system problem: open on gdbm database \""
    321        << gdbm_filename << "\" failed\n\n";
     319       << "system problem: open on database \"" << db_filename << "\" failed\n\n";
    322320    err = systemProblem;
    323321    return;
     
    383381     
    384382      // translate the document number
    385       if (!translate(gdbmptr, *docorder_here, trans_OID)) {
     383      if (!translate(db_ptr, *docorder_here, trans_OID)) {
    386384    logout << text_t2ascii
    387385           << "warning: could not translate mg document number \""
     
    445443  }
    446444
    447   gdbmptr->closedatabase();  // Important that local library doesn't leave any files open
     445  db_ptr->closedatabase();  // Important that local library doesn't leave any files open
    448446  response.numDocs = queryresults.docs_matched;
    449447  response.isApprox = queryresults.is_approx;
Note: See TracChangeset for help on using the changeset viewer.