* mu-store: add mu_store_count
This commit is contained in:
@ -75,6 +75,20 @@ mu_store_new (const char* xpath)
|
||||
|
||||
|
||||
|
||||
unsigned
|
||||
mu_store_count (MuStore *store)
|
||||
{
|
||||
g_return_val_if_fail (store, NULL);
|
||||
|
||||
try {
|
||||
return store->_db->get_doccount();
|
||||
|
||||
} MU_XAPIAN_CATCH_BLOCK;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
mu_store_version (MuStore *store)
|
||||
{
|
||||
|
||||
@ -48,6 +48,15 @@ MuStore* mu_store_new (const char* path);
|
||||
void mu_store_destroy (MuStore *store);
|
||||
|
||||
|
||||
/**
|
||||
* get the numbers of documents in the database
|
||||
*
|
||||
* @param index a valid MuStore instance
|
||||
*
|
||||
* @return the number of documents in the database; 0 in case of error
|
||||
* or an empty database
|
||||
*/
|
||||
unsigned mu_store_count (MuStore *store);
|
||||
|
||||
/**
|
||||
* get a version string for the database
|
||||
|
||||
Reference in New Issue
Block a user