1 /* brass_types.h: Types used by brass backend and the Btree manager 2 * 3 * Copyright 1999,2000,2001 BrightStation PLC 4 * Copyright 2002,2003,2004,2008,2009 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, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 19 * USA 20 */ 21 22 #ifndef OM_HGUARD_BRASS_TYPES_H 23 #define OM_HGUARD_BRASS_TYPES_H 24 25 #include "internaltypes.h" 26 27 typedef unsigned int brass_blocksize_t; 28 29 /** A type used to store a revision number for a table. 30 * 31 * A table's revision number increases monotonically, incrementing by 32 * one each time a modification is applied to the table. 33 * 34 * FIXME: ensure that this is of a suitable minimum size - 32 bits is 35 * satisfactory in most cases, but in extreme cases could cause the revision 36 * number to roll over after a few years. It would be better to use 64 bits 37 * (and / or to ensure that rolling over causes no problem). 38 */ 39 typedef unsigned int brass_revision_number_t; 40 41 /** A type used to store the number of entries in a table. 42 * 43 * Again, this must be of suitable minimum size. 44 */ 45 typedef unsigned long long brass_tablesize_t; 46 47 /** An integer type for storing the length of a document - ie, the sum of the 48 * wdfs of the terms in the document. 49 */ 50 typedef unsigned int brass_doclen_t; 51 52 /** The default block size to use in a B-tree table. 53 * If this is changed, be sure to update the API documentation 54 * correspondingly. 55 */ 56 #define BRASS_DEFAULT_BLOCK_SIZE 8192 57 58 /// The largest docid value supported by brass. 59 #define BRASS_MAX_DOCID Xapian::docid(0xffffffff) 60 61 #endif /* OM_HGUARD_BRASS_TYPES_H */ 62