Up: Table Types [Contents][Index]
typedef struct blonde_record_type { const char *name; unsigned inner, outer, piece; void *error, *trans; } blonde_record_type;
The record sets up a table creation.
See blonde_init_record.
The fields that are always interpreted are:
name
the table name, an eight bytes long string. It may not include 0 bytes.
The fields that are interpreted if so requested are:
inner
the inner block data size hint.
The b-tree inner (or internal) blocks organize the outer blocks. Actual set block size is a nearby power of two, between 256 and 524288.
outer
the outer block data size hint.
The b-tree outer (or external) blocks store application keys and data. Actual set block size is a nearby power of two, between 256 and 524288.
piece
the key associated data size.
nonblonde tables have a variable data size, unless thus specified.
For new tables, the field is used to set the data size, if the ‘BLONDE_RECORD_PIECE_MASK’ bit is set in the flags argument of the table creator function. Otherwise, and if ‘BLONDE_RECORD_FIXED_MASK’ is set, the field is set to -1.
For existing tables, the field is set by the function to the recorded data size, if the table defines one, and to -1 otherwise, when the ‘BLONDE_RECORD_FIXED_MASK’ bit is set. If the retrieval bit is not set and the on disk table defines a fixed data size, the in-memory table creation fails.
If the data is fixed, the arguments setting the data size for functions inserting or modifying keys are ignored.
error
the error recorder
trans
the memory allocator
The actual block data sizes will be powers of two nearby the indicated values. The block size hints are not taken for tables that already exist on disk. The lower block size limit is 256 bytes, the upper is 524288 bytes.
See The Nodes.
Up: Table Types [Contents][Index]