wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
dyn_table.hpp File Reference

DynTable — the generic, runtime-schema client-database table: the ONE table class every binding welds, replacing the ~8.5k generated per-era classes on the binding surface entirely. More...

#include <cstddef>
#include <cstdint>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/error.hpp>
#include <wowlib/db/record_bridge.hpp>
#include <wowlib/db/schema_catalog.hpp>
#include <wowlib/db/table_core.hpp>
Include dependency graph for dyn_table.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  wowlib::db::detail::ColumnRows
 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...
struct  wowlib::db::detail::ColumnRows::Facts
 The per-column access facts, derived from the schema at bind. More...
struct  wowlib::db::PodColumnView
 A scalar column's whole storage, for zero-copy array views: the raw exact-width buffer plus the facts to type it (rows x elements_per_row matrix, row-major). More...
class  wowlib::db::DynTable
 The generic client-database table: schema resolved at runtime from the schema catalog, rows in a column store, format engine and preserved decode state inherited from TableBase (read/write/validate/strings/ encryptedSections all bind once, there). More...

Namespaces

namespace  wowlib
namespace  wowlib::db
namespace  wowlib::db::detail

Detailed Description

DynTable — the generic, runtime-schema client-database table: the ONE table class every binding welds, replacing the ~8.5k generated per-era classes on the binding surface entirely.

The schema arrives as DATA (wowlib::db::SchemaCatalog — the WDBS blob dbdgen bakes), the rows live in a COLUMN STORE (one exact-width buffer per column — scan-friendly, and scalar columns are zero-copy viewable as (rows × elements) matrices), and the format engine is the same wowlib::db::TableCore every typed table uses: the codecs only ever spoke the (record, column, element) sink/source protocol, so the column store implements wowlib::db::RecordSink / wowlib::db::RecordSource directly and byte-perfect round-trip is inherited, not re-earned.

Cell semantics mirror the erased record bridge exactly (record_bridge.cpp is the reference): integers store truncated to the column's exact width and load back sign-correctly; a LocString column's FLAGS field travels as the codec's setInt/getInt on the column (never element-addressed); strings are element-addressed slots. The public accessors are stricter than the codec protocol — a kind mismatch or an out-of-range index is a designed error, not a silent no-op.

Definition in file dyn_table.hpp.