|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
The column-store row storage: one exact-width POD buffer per numeric column, one string vector per string-bearing column, one flags vector per LocString column — implementing both codec interfaces over them. More...
#include <wowlib/db/dyn_table.hpp>
Classes | |
| struct | Facts |
| The per-column access facts, derived from the schema at bind. More... | |
Public Member Functions | |
| ColumnRows ()=default | |
| ColumnRows (std::span< const Column > schema) | |
| Bind the store to schema (whose lifetime the owner guarantees) and derive the per-column access facts. | |
| void | clear () override |
| void | reserve (std::size_t n) override |
| std::size_t | add () override |
| std::size_t | size () const override |
| One override serves both interfaces (identical signatures). | |
| std::uint32_t | idOf (std::size_t record) const override |
| void | setInt (std::size_t record, std::size_t column, std::size_t element, std::int64_t value) override |
| void | setFloat (std::size_t record, std::size_t column, std::size_t element, float value) override |
| void | setString (std::size_t record, std::size_t column, std::size_t element, std::string_view value) override |
| void | cloneWithId (std::size_t src, std::uint32_t newId) override |
| Clone record src into a fresh record and set its id column to newId (WDC copy-table materialization). | |
| std::size_t | findById (std::uint32_t id) const override |
| The first record whose id equals id, or size() when none (copy source lookup). | |
| std::int64_t | getInt (std::size_t record, std::size_t column, std::size_t element) const override |
| std::uint32_t | getSlot (std::size_t record, std::size_t column, std::size_t element) const override |
| std::string_view | getString (std::size_t record, std::size_t column, std::size_t element) const override |
| void | eraseRow (std::size_t record) |
| Remove row record (all columns' slices). | |
| std::string & | stringSlot (std::size_t record, std::size_t column, std::size_t element) |
| Mutable string slot access (the public setter's target). | |
| std::uint32_t & | flagsSlot (std::size_t record, std::size_t column) |
| The LocString flags of record in column. | |
| std::uint32_t | flagsSlot (std::size_t record, std::size_t column) const |
| const Facts & | facts (std::size_t column) const |
| std::span< const std::byte > | podBytes (std::size_t column) const |
| The whole POD buffer of column column (row-major, exact width) — the zero-copy view the bindings expose as an array. | |
| std::span< const Column > | schema () const |
| Public Member Functions inherited from wowlib::db::RecordSink | |
| virtual | ~RecordSink ()=default |
| Public Member Functions inherited from wowlib::db::RecordSource | |
| virtual | ~RecordSource ()=default |
The column-store row storage: one exact-width POD buffer per numeric column, one string vector per string-bearing column, one flags vector per LocString column — implementing both codec interfaces over them.
Not welded; wowlib::db::DynTable is the bound face.
Definition at line 45 of file dyn_table.hpp.
|
default |
References schema().
|
explicit |
Bind the store to schema (whose lifetime the owner guarantees) and derive the per-column access facts.
| schema | the resolved column list. |
Definition at line 134 of file dyn_table.cpp.
References wowlib::db::Column::arrayLen, wowlib::db::Column::bits, wowlib::db::detail::ColumnRows::Facts::elemBytes, wowlib::db::Float, wowlib::db::detail::ColumnRows::Facts::hasFlags, wowlib::db::Int, wowlib::db::Column::isId, wowlib::db::detail::ColumnRows::Facts::kind, wowlib::db::Column::localeCount, wowlib::db::LocString, wowlib::db::detail::ColumnRows::Facts::podSlots, schema(), wowlib::db::String, wowlib::db::detail::ColumnRows::Facts::strSlots, and wowlib::db::Column::type.
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 191 of file dyn_table.cpp.
References wowlib::db::detail::ColumnRows::Facts::elemBytes, wowlib::db::detail::ColumnRows::Facts::hasFlags, wowlib::db::detail::ColumnRows::Facts::podSlots, and wowlib::db::detail::ColumnRows::Facts::strSlots.
Referenced by cloneWithId().
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 173 of file dyn_table.cpp.
|
overridevirtual |
Clone record src into a fresh record and set its id column to newId (WDC copy-table materialization).
Implements wowlib::db::RecordSink.
Definition at line 228 of file dyn_table.cpp.
References add(), wowlib::db::detail::ColumnRows::Facts::elemBytes, wowlib::db::detail::ColumnRows::Facts::hasFlags, wowlib::db::detail::ColumnRows::Facts::podSlots, and wowlib::db::detail::ColumnRows::Facts::strSlots.
| void wowlib::db::detail::ColumnRows::eraseRow | ( | std::size_t | record | ) |
Remove row record (all columns' slices).
Definition at line 280 of file dyn_table.cpp.
References wowlib::db::detail::ColumnRows::Facts::elemBytes, wowlib::db::detail::ColumnRows::Facts::hasFlags, wowlib::db::detail::ColumnRows::Facts::podSlots, and wowlib::db::detail::ColumnRows::Facts::strSlots.
|
inline |
Definition at line 93 of file dyn_table.hpp.
|
overridevirtual |
The first record whose id equals id, or size() when none (copy source lookup).
Implements wowlib::db::RecordSink.
Definition at line 244 of file dyn_table.cpp.
References idOf().
| std::uint32_t & wowlib::db::detail::ColumnRows::flagsSlot | ( | std::size_t | record, |
| std::size_t | column ) |
The LocString flags of record in column.
Definition at line 301 of file dyn_table.cpp.
| std::uint32_t wowlib::db::detail::ColumnRows::flagsSlot | ( | std::size_t | record, |
| std::size_t | column ) const |
Definition at line 305 of file dyn_table.cpp.
|
overridevirtual |
Implements wowlib::db::RecordSource.
Definition at line 250 of file dyn_table.cpp.
References wowlib::db::detail::F32, wowlib::db::detail::ColumnRows::Facts::kind, wowlib::db::detail::LocStr, and wowlib::db::detail::ColumnRows::Facts::podSlots.
|
overridevirtual |
Implements wowlib::db::RecordSource.
Definition at line 258 of file dyn_table.cpp.
References wowlib::db::detail::F32, wowlib::db::detail::ColumnRows::Facts::kind, wowlib::db::detail::LocStr, and wowlib::db::detail::Str.
|
overridevirtual |
Implements wowlib::db::RecordSource.
Definition at line 274 of file dyn_table.cpp.
References wowlib::db::detail::ColumnRows::Facts::strSlots.
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 204 of file dyn_table.cpp.
Referenced by findById().
|
inline |
The whole POD buffer of column column (row-major, exact width) — the zero-copy view the bindings expose as an array.
| column | a numeric/float column. |
Definition at line 99 of file dyn_table.hpp.
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 182 of file dyn_table.cpp.
References wowlib::db::detail::ColumnRows::Facts::elemBytes, wowlib::db::detail::ColumnRows::Facts::hasFlags, wowlib::db::detail::ColumnRows::Facts::podSlots, and wowlib::db::detail::ColumnRows::Facts::strSlots.
|
inline |
Definition at line 104 of file dyn_table.hpp.
Referenced by ColumnRows(), and ColumnRows().
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 219 of file dyn_table.cpp.
References wowlib::db::detail::F32.
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 209 of file dyn_table.cpp.
References wowlib::db::detail::F32, wowlib::db::detail::ColumnRows::Facts::kind, wowlib::db::detail::LocStr, and wowlib::db::detail::ColumnRows::Facts::podSlots.
|
overridevirtual |
Implements wowlib::db::RecordSink.
Definition at line 223 of file dyn_table.cpp.
References wowlib::db::detail::ColumnRows::Facts::strSlots.
|
overridevirtual |
One override serves both interfaces (identical signatures).
Implements wowlib::db::RecordSink.
Definition at line 202 of file dyn_table.cpp.
| std::string & wowlib::db::detail::ColumnRows::stringSlot | ( | std::size_t | record, |
| std::size_t | column, | ||
| std::size_t | element ) |
Mutable string slot access (the public setter's target).
Definition at line 297 of file dyn_table.cpp.