xapian-core  1.4.26
Namespaces | Macros | Typedefs | Enumerations
glass_defs.h File Reference

Definitions, types, etc for use inside glass. More...

#include "internaltypes.h"
+ Include dependency graph for glass_defs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Glass
 

Macros

#define GLASS_TABLE_EXTENSION   "glass"
 Glass table extension. More...
 
#define GLASS_DEFAULT_BLOCKSIZE   8192
 Default B-tree block size. More...
 
#define GLASS_MIN_BLOCKSIZE   2048
 Minimum B-tree block size. More...
 
#define GLASS_MAX_BLOCKSIZE   65536
 Maximum B-tree block size. More...
 
#define GLASS_BTREE_CURSOR_LEVELS   10
 Allow for this many levels in the B-tree. More...
 
#define GLASS_MAX_DOCID   Xapian::docid(0xffffffffffffffff)
 The largest docid value supported by glass. More...
 

Typedefs

typedef uint4 glass_block_t
 A block number in a glass Btree file. More...
 
typedef uint4 glass_revision_number_t
 The revision number of a glass database. More...
 
typedef unsigned long long glass_tablesize_t
 How many entries there are in a table. More...
 

Enumerations

enum  Glass::table_type {
  Glass::POSTLIST, Glass::DOCDATA, Glass::TERMLIST, Glass::POSITION,
  Glass::SPELLING, Glass::SYNONYM, Glass::MAX_
}
 

Detailed Description

Definitions, types, etc for use inside glass.

Definition in file glass_defs.h.

Macro Definition Documentation

◆ GLASS_BTREE_CURSOR_LEVELS

#define GLASS_BTREE_CURSOR_LEVELS   10

Allow for this many levels in the B-tree.

With 10, overflow is practically impossible. FIXME: but we want it to be completely impossible...

Definition at line 43 of file glass_defs.h.

Referenced by GlassTable::split_root(), and Glass::RootInfo::unserialise().

◆ GLASS_DEFAULT_BLOCKSIZE

#define GLASS_DEFAULT_BLOCKSIZE   8192

Default B-tree block size.

Definition at line 30 of file glass_defs.h.

Referenced by GlassDatabase::compact(), and GlassDatabase::GlassDatabase().

◆ GLASS_MAX_BLOCKSIZE

#define GLASS_MAX_BLOCKSIZE   65536

Maximum B-tree block size.

Definition at line 36 of file glass_defs.h.

Referenced by Glass::RootInfo::unserialise().

◆ GLASS_MAX_DOCID

#define GLASS_MAX_DOCID   Xapian::docid(0xffffffffffffffff)

The largest docid value supported by glass.

The disk format supports 64-bit docids, but if Xapian::docid is narrower then it's the largest value supported by the type that matters here.

Definition at line 50 of file glass_defs.h.

Referenced by GlassWritableDatabase::add_document(), GlassPostListTable::get_used_docid_range(), and Glass::ValueUpdater::update().

◆ GLASS_MIN_BLOCKSIZE

#define GLASS_MIN_BLOCKSIZE   2048

Minimum B-tree block size.

Definition at line 33 of file glass_defs.h.

Referenced by test_if_single_file_db(), and Glass::RootInfo::unserialise().

◆ GLASS_TABLE_EXTENSION

#define GLASS_TABLE_EXTENSION   "glass"

Typedef Documentation

◆ glass_block_t

A block number in a glass Btree file.

Definition at line 65 of file glass_defs.h.

◆ glass_revision_number_t

The revision number of a glass database.

Definition at line 68 of file glass_defs.h.

◆ glass_tablesize_t

typedef unsigned long long glass_tablesize_t

How many entries there are in a table.

Definition at line 71 of file glass_defs.h.