44 throw std::logic_error(
"row store exceeds capacity");
58 void dump(std::ostream &out)
const override;
std::size_t id
the internal identifier of the attribute, unique within its table
This class implements a row store.
void drop() override
Drop the most recently appended row.
int offset(const Attribute &attr) const
memory::Memory data_
the underlying memory containing the data
std::size_t row_size() const
Returns the effective size of a row, in bits.
std::size_t num_rows_
the number of rows in use
uint32_t * offsets_
the offsets from the first column, in bits, of all columns
memory::LinearAllocator allocator_
the memory allocator
const memory::Memory & memory() const override
Returns the memory of the store.
int offset(uint32_t idx) const
void append() override
Append a row to the store.
std::size_t capacity_
the number of available rows
uint32_t row_size_
the size of a row, in bits; includes NULL bitmap and other meta data
static constexpr std::size_t ALLOCATION_SIZE
1 GiB
void memory(memory::Memory memory)
Sets the memory of the store to memory.
void compute_offsets()
Computes the offsets of the attributes within a row.
virtual std::size_t num_rows() const override
Return the number of rows in this store.
uintptr_t at(std::size_t idx) const
Return a pointer to the idxth row.
Defines a generic store interface.
const Table & table() const
A table is a sorted set of attributes.
This is the simplest kind of allocator.
Represents a mapping created by a memory::Allocator.
T as()
Returns a pointer to the beginning of the virtual address space where this allocation is mapped to,...