#include <flint_table.h>
Public Member Functions | |
| Key_ (const byte *p_) | |
| const byte * | get_address () const |
| void | read (std::string *key) const |
| bool | operator== (Key_ key2) const |
| bool | operator!= (Key_ key2) const |
| bool | operator< (Key_ key2) const |
| Compares this key with key2. | |
| bool | operator>= (Key_ key2) const |
| bool | operator> (Key_ key2) const |
| bool | operator<= (Key_ key2) const |
| int | length () const |
| char | operator[] (size_t i) const |
Private Attributes | |
| const byte * | p |
Definition at line 99 of file flint_table.h.
| Key_::Key_ | ( | const byte * | p_ | ) | [inline, explicit] |
Definition at line 102 of file flint_table.h.
| const byte* Key_::get_address | ( | ) | const [inline] |
Definition at line 103 of file flint_table.h.
Referenced by FlintTable::enter_key(), FlintTable::find_in_block(), and Item_wr_::set_key_and_block().
| int Key_::length | ( | ) | const [inline] |
Definition at line 113 of file flint_table.h.
Referenced by FlintTable::add(), FlintTable::enter_key(), operator<(), operator==(), BtreeCheck::print_key(), and Item_wr_::set_key_and_block().
| bool Key_::operator!= | ( | Key_ | key2 | ) | const [inline] |
Definition at line 108 of file flint_table.h.
| bool Key_::operator< | ( | Key_ | key2 | ) | const |
Compares this key with key2.
The result is true if this key precedes key2. The comparison is for byte sequence collating order, taking lengths into account. So if the keys are made up of lower case ASCII letters we get alphabetical ordering.
Now remember that items are added into the B-tree in fastest time when they are preordered by their keys. This is therefore the piece of code that needs to be followed to arrange for the preordering.
This is complicated by the fact that keys have two parts - a value and then a count. We first compare the values, and only if they are equal do we compare the counts.
Definition at line 2243 of file flint_table.cc.
| bool Key_::operator<= | ( | Key_ | key2 | ) | const [inline] |
Definition at line 112 of file flint_table.h.
| bool Key_::operator== | ( | Key_ | key2 | ) | const |
| bool Key_::operator> | ( | Key_ | key2 | ) | const [inline] |
Definition at line 111 of file flint_table.h.
| bool Key_::operator>= | ( | Key_ | key2 | ) | const [inline] |
Definition at line 110 of file flint_table.h.
| char Key_::operator[] | ( | size_t | i | ) | const [inline] |
| void Key_::read | ( | std::string * | key | ) | const [inline] |
Definition at line 100 of file flint_table.h.
Referenced by FlintTable::find(), operator<(), and operator==().