Public Member Functions | |
Database (const char *dbname, int mode) | |
~Database () | |
void | close () |
int | put_doc (Document *doc, int options) |
ResultIterator * | search (Cond *cond, int options) |
const char * | get_err_msg () |
const char * | get_fatal_err_msg () |
int | flush (int _max) |
int | sync () |
int | optimize (int options) |
int | out_doc (int id, int options) |
int | uri_to_id (const char *uri) |
std::map< std::string, std::string > * | etch_doc (Document *doc, int max) |
int | iter_init () |
int | iter_next () |
const char * | db_name () |
int | doc_num () |
int | word_num () |
double | size () |
void | set_cache_size (size_t size, int anum, int tnum) |
Private Attributes | |
ESTMTDB * | db |
|
open the database Definition at line 225 of file HyperEstraierWrapper.cpp. References db. 00225 { 00229 int ecode; 00230 if (!(db = est_mtdb_open(dbname, mode, &ecode))) { 00231 throw est_err_msg(ecode); 00232 } 00233 }
|
|
Definition at line 234 of file HyperEstraierWrapper.cpp. References close(). 00234 { 00235 close(); 00236 }
|
|
close the database Definition at line 237 of file HyperEstraierWrapper.cpp. References db. Referenced by ~Database(). 00237 { 00241 if (db) { 00242 int ecode; 00243 if (!(est_mtdb_close(db, &ecode))) { 00244 throw est_err_msg(ecode); 00245 } 00246 db = NULL; 00247 } 00248 }
|
|
get the name of a database Definition at line 332 of file HyperEstraierWrapper.cpp. References db. 00332 { 00336 return est_mtdb_name(db); 00337 }
|
|
get the number of documents in a database Definition at line 338 of file HyperEstraierWrapper.cpp. References db. 00338 { 00342 return est_mtdb_doc_num(db); 00343 }
|
|
extract keywords of a document object Definition at line 305 of file HyperEstraierWrapper.cpp. References db, and Document::doc. 00305 { 00309 std::map<std::string, std::string> * mss = new std::map<std::string, std::string>; 00310 00311 CBMAP * keys = est_mtdb_etch_doc(db, doc->doc, max); 00312 00313 cbmapiterinit(keys); 00314 int ksiz; 00315 while (const char *key = cbmapiternext(keys, &ksiz)) { 00316 mss->insert(std::make_pair(key, cbmapget(keys, key, ksiz, NULL))); 00317 } 00318 return mss; 00319 }
|
|
flush index words in the cache of a database Definition at line 275 of file HyperEstraierWrapper.cpp. References db. 00275 { 00279 return est_mtdb_flush(db, _max); 00280 }
|
|
get the string of an error Definition at line 263 of file HyperEstraierWrapper.cpp. References db. 00263 { 00267 return est_err_msg(est_mtdb_error(db)); 00268 }
|
|
get the string of an fatal error Definition at line 269 of file HyperEstraierWrapper.cpp. References db. 00269 { 00273 return est_err_msg(est_mtdb_fatal(db)); 00274 }
|
|
initialize the iterator of a database Definition at line 320 of file HyperEstraierWrapper.cpp. References db. 00320 { 00324 return est_mtdb_iter_init(db); 00325 }
|
|
get the next ID of the iterator of a database Definition at line 326 of file HyperEstraierWrapper.cpp. References db. 00326 { 00330 return est_mtdb_iter_next(db); 00331 }
|
|
optimize a database Definition at line 287 of file HyperEstraierWrapper.cpp. References db. 00287 { 00291 return est_mtdb_optimize(db, options); 00292 }
|
|
remove a document from a database Definition at line 293 of file HyperEstraierWrapper.cpp. References db. 00293 { 00297 return est_mtdb_out_doc(db, id, options); 00298 }
|
|
add a document to a database Definition at line 249 of file HyperEstraierWrapper.cpp. References db, and Document::doc.
|
|
search documents corresponding a condition for a database Definition at line 255 of file HyperEstraierWrapper.cpp. References Cond::cond, and db. 00255 { 00259 int resnum; 00260 int * result = est_mtdb_search(db, cond->cond, &resnum, NULL); 00261 return new ResultIterator(db, result, resnum, options); 00262 }
|
|
set the maximum size of the cache memory of a database Definition at line 356 of file HyperEstraierWrapper.cpp. References db.
|
|
get the size of a database Definition at line 350 of file HyperEstraierWrapper.cpp. References db. 00350 { 00354 return est_mtdb_size(db); 00355 }
|
|
synchronize updating contents of a database Definition at line 281 of file HyperEstraierWrapper.cpp. References db. 00281 { 00285 return est_mtdb_sync(db); 00286 }
|
|
get the ID of a document spacified by URI Definition at line 299 of file HyperEstraierWrapper.cpp. References db. 00299 { 00303 return est_mtdb_uri_to_id(db, uri); 00304 }
|
|
get the number of unique words in a database Definition at line 344 of file HyperEstraierWrapper.cpp. References db. 00344 { 00348 return est_mtdb_word_num(db); 00349 }
|
|
Definition at line 223 of file HyperEstraierWrapper.cpp. Referenced by close(), Database(), db_name(), doc_num(), etch_doc(), flush(), get_err_msg(), get_fatal_err_msg(), iter_init(), iter_next(), optimize(), out_doc(), put_doc(), search(), set_cache_size(), size(), sync(), uri_to_id(), and word_num(). |