backends/quartz/btree.h File Reference

#include <xapian/visibility.h>
#include <algorithm>
#include <string>
#include "quartz_types.h"
#include "btree_base.h"
#include "btree_util.h"
#include "bcursor.h"
#include "noreturn.h"

Include dependency graph for btree.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Key
class  Item_base< T >
class  Item
class  Item_wr
class  Btree
 Class managing a Btree table in a Quartz database. More...

Defines

#define BYTES_PER_BLOCK_NUMBER   4
#define K1   1
#define I2   2
#define D2   2
#define C2   2
#define GETK(p, c)   GETINT1(p, c)
#define SETD(p, c, x)   SETINT2(p, c, x)
#define REVISION(b)   static_cast<unsigned int>(get_int4(b, 0))
#define GET_LEVEL(b)   GETINT1(b, 4)
#define MAX_FREE(b)   GETINT2(b, 5)
#define TOTAL_FREE(b)   GETINT2(b, 7)
#define DIR_END(b)   GETINT2(b, 9)
#define DIR_START   11
#define SET_REVISION(b, x)   set_int4(b, 0, x)
#define SET_LEVEL(b, x)   SETINT1(b, 4, x)
#define SET_MAX_FREE(b, x)   SETINT2(b, 5, x)
#define SET_TOTAL_FREE(b, x)   SETINT2(b, 7, x)
#define SET_DIR_END(b, x)   SETINT2(b, 9, x)
#define SEQ_START_POINT   (-10)
 Flip to sequential addition block-splitting after this number of observed sequential additions (in negated form).
#define BLOCK_CAPACITY   4
 Even for items of at maximum size, it must be possible to get this number of items in a block.
#define BTREE_CURSOR_LEVELS   10

Variables

const string::size_type BTREE_MAX_KEY_LEN = 252
 The largest possible value of a key_len.


Define Documentation

#define BYTES_PER_BLOCK_NUMBER   4

Definition at line 45 of file btree.h.

#define K1   1

Definition at line 57 of file btree.h.

#define I2   2

Definition at line 58 of file btree.h.

#define D2   2

Definition at line 59 of file btree.h.

#define C2   2

Definition at line 60 of file btree.h.

#define GETK ( p,
 )     GETINT1(p, c)

Definition at line 64 of file btree.h.

Referenced by Item_base< const byte * >::append_chunk(), Item_base< const byte * >::component_of(), Item_base< const byte * >::components_of(), Key::length(), Item_wr::set_component_of(), and Item_wr::set_components_of().

#define SETD ( p,
c,
 )     SETINT2(p, c, x)

Definition at line 65 of file btree.h.

Referenced by Btree::add_item_to_block(), Btree::add_kt(), Btree::compact(), and Btree::read_root().

#define REVISION (  )     static_cast<unsigned int>(get_int4(b, 0))

Definition at line 113 of file btree.h.

#define GET_LEVEL (  )     GETINT1(b, 4)

Definition at line 114 of file btree.h.

#define MAX_FREE (  )     GETINT2(b, 5)

Definition at line 115 of file btree.h.

#define TOTAL_FREE (  )     GETINT2(b, 7)

Definition at line 116 of file btree.h.

#define DIR_END (  )     GETINT2(b, 9)

Definition at line 117 of file btree.h.

#define DIR_START   11

Definition at line 118 of file btree.h.

#define SET_REVISION ( b,
 )     set_int4(b, 0, x)

Definition at line 120 of file btree.h.

#define SET_LEVEL ( b,
 )     SETINT1(b, 4, x)

Definition at line 121 of file btree.h.

#define SET_MAX_FREE ( b,
 )     SETINT2(b, 5, x)

Definition at line 122 of file btree.h.

#define SET_TOTAL_FREE ( b,
 )     SETINT2(b, 7, x)

Definition at line 123 of file btree.h.

#define SET_DIR_END ( b,
 )     SETINT2(b, 9, x)

Definition at line 124 of file btree.h.

#define SEQ_START_POINT   (-10)

Flip to sequential addition block-splitting after this number of observed sequential additions (in negated form).

Definition at line 128 of file btree.h.

#define BLOCK_CAPACITY   4

Even for items of at maximum size, it must be possible to get this number of items in a block.

Definition at line 132 of file btree.h.

#define BTREE_CURSOR_LEVELS   10

Definition at line 289 of file btree.h.


Variable Documentation

const string::size_type BTREE_MAX_KEY_LEN = 252

The largest possible value of a key_len.

This gives the upper limit of the size of a key that may be stored in the B-tree (252 bytes with the present implementation).

Definition at line 42 of file btree.h.

Referenced by Btree::add(), Btree::del(), Bcursor::find_entry(), Item_wr::form_key(), Btree::get_exact_entry(), and process_lines().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.