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