Fluent builder for constructing a Schema one column at a time.
More...
#include <schema.hpp>
Fluent builder for constructing a Schema one column at a time.
SchemaBuilder & column(std::string col_name, LogicalType logical_type=LogicalType::NONE)
Add a typed column, deducing PhysicalType from T.
Schema build()
Build the final Schema, consuming the builder.
SchemaBuilder & optional_column(std::string col_name, LogicalType logical_type=LogicalType::NONE)
Add an optional (nullable) column — shorthand for Repetition::OPTIONAL.
static SchemaBuilder builder(std::string name)
Create a SchemaBuilder for fluent column construction.
@ TIMESTAMP_NS
Timestamp — INT64, nanoseconds since Unix epoch.
- See also
- Schema::builder(), Column
Definition at line 92 of file schema.hpp.
◆ SchemaBuilder()
| signet::forge::SchemaBuilder::SchemaBuilder |
( |
std::string |
name | ) |
|
|
inlineexplicit |
Construct a builder with the given root schema name.
- Parameters
-
| name | Root schema name (e.g. "trades"). |
Definition at line 96 of file schema.hpp.
◆ build()
| Schema signet::forge::SchemaBuilder::build |
( |
| ) |
|
|
inline |
Build the final Schema, consuming the builder.
After calling build(), the builder is left in a moved-from state and should not be reused.
- Returns
- An immutable Schema.
Definition at line 303 of file schema.hpp.
◆ column() [1/2]
Add a column with an explicit repetition level.
- Template Parameters
-
- Parameters
-
| col_name | Column name. |
| logical_type | Logical annotation. |
| repetition | Field repetition (REQUIRED, OPTIONAL, REPEATED). |
- Returns
- Reference to this builder for chaining.
Definition at line 132 of file schema.hpp.
◆ column() [2/2]
Add a typed column, deducing PhysicalType from T.
For std::string columns with no explicit logical type, defaults to LogicalType::STRING.
- Template Parameters
-
| T | C++ type (bool, int32_t, int64_t, float, double, std::string). |
- Parameters
-
| col_name | Column name (must be unique within the schema). |
| logical_type | Optional logical annotation (default: NONE / auto). |
- Returns
- Reference to this builder for chaining.
Definition at line 107 of file schema.hpp.
◆ optional_column()
Add an optional (nullable) column — shorthand for Repetition::OPTIONAL.
- Template Parameters
-
- Parameters
-
| col_name | Column name. |
| logical_type | Optional logical annotation. |
- Returns
- Reference to this builder for chaining.
Definition at line 157 of file schema.hpp.
◆ raw_column()
Add a pre-built ColumnDescriptor directly.
Useful for FIXED_LEN_BYTE_ARRAY columns where type_length must be set manually, or for columns that cannot be expressed via Column<T>.
- Parameters
-
| cd | A fully-populated column descriptor. |
- Returns
- Reference to this builder for chaining.
Definition at line 168 of file schema.hpp.
The documentation for this class was generated from the following file: