xapian-core  2.0.0
constants.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2012,2013,2014,2015,2016,2017,2018 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_CONSTANTS_H
22 #define XAPIAN_INCLUDED_CONSTANTS_H
23 
24 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
25 # error Never use <xapian/constants.h> directly; include <xapian.h> instead.
26 #endif
27 
28 namespace Xapian {
29 
34 const int DB_CREATE_OR_OPEN = 0x00;
35 
37 const int DB_CREATE_OR_OVERWRITE = 0x01;
38 
43 const int DB_CREATE = 0x02;
44 
49 const int DB_OPEN = 0x03;
50 
51 #ifdef XAPIAN_LIB_BUILD
53 const int DB_ACTION_MASK_ = 0x03;
54 #endif
55 
65 const int DB_NO_SYNC = 0x04;
66 
82 const int DB_FULL_SYNC = 0x08;
83 
102 const int DB_DANGEROUS = 0x10;
103 
135 const int DB_NO_TERMLIST = 0x20;
136 
144 const int DB_RETRY_LOCK = 0x40;
145 
157 const int DB_BACKEND_GLASS = 0x100;
158 
166 const int DB_BACKEND_STUB = 0x300;
167 
182 const int DB_BACKEND_INMEMORY = 0x400;
183 
197 const int DB_BACKEND_HONEY = 0x500;
198 
199 #ifdef XAPIAN_LIB_BUILD
201 const int DB_BACKEND_MASK_ = 0x700;
202 
204 const int DB_READONLY_ = -1;
205 #endif
206 
207 
212 const int DBCHECK_SHORT_TREE = 1;
213 
218 const int DBCHECK_FULL_TREE = 2;
219 
224 const int DBCHECK_SHOW_FREELIST = 4;
225 
230 const int DBCHECK_SHOW_STATS = 8;
231 
238 const int DBCHECK_FIX = 16;
239 
240 
251 const int DBCOMPACT_NO_RENUMBER = 4;
252 
257 const int DBCOMPACT_MULTIPASS = 8;
258 
263 const int DBCOMPACT_SINGLE_FILE = 16;
264 
275 const int DOC_ASSUME_VALID = 1;
276 
277 }
278 
279 #endif /* XAPIAN_INCLUDED_CONSTANTS_H */
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
const int DB_BACKEND_INMEMORY
Use the "in memory" backend.
Definition: constants.h:182
const int DB_CREATE
Create a new database.
Definition: constants.h:43
const int DBCHECK_SHOW_FREELIST
Show the bitmap for the B-tree.
Definition: constants.h:224
const int DBCHECK_SHOW_STATS
Show statistics for the B-tree.
Definition: constants.h:230
const int DB_RETRY_LOCK
If the database is already locked, retry the lock.
Definition: constants.h:144
const int DBCHECK_SHORT_TREE
Show a short-format display of the B-tree contents.
Definition: constants.h:212
const int DB_CREATE_OR_OPEN
Create database if it doesn't already exist.
Definition: constants.h:34
const int DB_BACKEND_STUB
Open a stub database file.
Definition: constants.h:166
const int DOC_ASSUME_VALID
Assume document id is valid.
Definition: constants.h:275
const int DB_OPEN
Open an existing database.
Definition: constants.h:49
const int DBCHECK_FIX
Fix problems.
Definition: constants.h:238
const int DBCHECK_FULL_TREE
Show a full display of the B-tree contents.
Definition: constants.h:218
const int DB_NO_SYNC
Don't attempt to ensure changes have hit disk.
Definition: constants.h:65
const int DBCOMPACT_MULTIPASS
If merging more than 3 databases, merge the postlists in multiple passes.
Definition: constants.h:257
const int DB_BACKEND_HONEY
Use the honey backend.
Definition: constants.h:197
const int DB_NO_TERMLIST
When creating a database, don't create a termlist table.
Definition: constants.h:135
const int DB_FULL_SYNC
Try to ensure changes are really written to disk.
Definition: constants.h:82
const int DB_BACKEND_GLASS
Use the glass backend.
Definition: constants.h:157
const int DBCOMPACT_NO_RENUMBER
Use the same document ids in the output as in the input(s).
Definition: constants.h:251
const int DBCOMPACT_SINGLE_FILE
Produce a single-file database.
Definition: constants.h:263
const int DB_CREATE_OR_OVERWRITE
Create database if it doesn't already exist, or overwrite if it does.
Definition: constants.h:37
const int DB_DANGEROUS
Update the database in-place.
Definition: constants.h:102