85 db.
set_metadata(
string(
"foo\0", 4),
string(
"foo\0bar", 7));
176 SKIP_TEST(
"Metadata not supported by this backend");
293 string longitem(20000,
'j');
Xapian::Database get_writable_database_as_database()
Xapian::WritableDatabase get_writable_database(const string &dbname)
Xapian::Database get_database(const string &dbname)
test functionality of the Xapian API
#define SKIP_TEST_FOR_BACKEND(B)
This class is used to access a database, or a group of databases.
std::string get_metadata(const std::string &key) const
Get the user-specified metadata associated with a given key.
Xapian::TermIterator metadata_keys_end(const std::string &=std::string()) const
Corresponding end iterator to metadata_keys_begin().
Xapian::TermIterator metadata_keys_begin(const std::string &prefix=std::string()) const
An iterator which returns all user-specified metadata keys.
Xapian::doccount get_doccount() const
Get the number of documents in the database.
bool reopen()
Re-open the database.
A handle representing a document in a Xapian database.
void add_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfinc=1)
Add an occurrence of a term at a particular position.
InvalidArgumentError indicates an invalid parameter value was passed to the API.
Class for iterating over a list of terms.
void skip_to(const std::string &term)
Advance the iterator to term term.
UnimplementedError indicates an attempt to use an unimplemented feature.
This class provides read/write access to a database.
void set_metadata(const std::string &key, const std::string &metadata)
Set the user-specified metadata associated with a given key.
void commit()
Commit any pending modifications made to the database.
Xapian::docid add_document(const Xapian::Document &document)
Add a new document to the database.
#define TEST_REL(A, REL, B)
Test a relation holds,e.g. TEST_REL(a,>,b);.
a generic test suite engine
#define SKIP_TEST(MSG)
Skip the current testcase with message MSG.
#define TEST_EQUAL(a, b)
Test for equality of two things.
#define TEST(a)
Test a condition, without an additional explanation for failure.
Xapian-specific test helper functions and macros.
#define TEST_EXCEPTION(TYPE, CODE)
Check that CODE throws exactly Xapian exception TYPE.
Public interfaces for the Xapian library.