ColumnTypeInfo
ColumnTypeInfo
Runtime type information for table columns. More…
#include <ColumnTypeInfo.hpp>
Public Functions
| Name | |
|---|---|
| ColumnTypeInfo() | |
| ColumnTypeInfo(std::type_index actual_type, std::type_index element_type, bool is_vector, bool is_nested, std::string type_name, std::string element_name) | |
| template <typename T > bool |
isType() const Check if this type matches a specific type. |
| template <typename T > bool |
hasElementType() const Check if the element type matches a specific type. |
| template <typename T > ColumnTypeInfo |
fromType() Create ColumnTypeInfo from a template type. |
Public Attributes
| Name | |
|---|---|
| std::type_index | actualType The actual std::type_index of the column data. |
| std::type_index | elementType For vectors, the element type; same as actualType for scalars. |
| bool | isVectorType True if the type is std::vector |
| bool | isNestedVector True if the type is std::vector<std::vector |
| std::string | typeName Human-readable type name. |
| std::string | elementTypeName Human-readable element type name. |
Detailed Description
struct ColumnTypeInfo;Runtime type information for table columns.
This stores the essential type information needed for consumers to understand column data without making assumptions about how they’ll use it.
Public Functions Documentation
function ColumnTypeInfo
inline ColumnTypeInfo()function ColumnTypeInfo
inline ColumnTypeInfo(
std::type_index actual_type,
std::type_index element_type,
bool is_vector,
bool is_nested,
std::string type_name,
std::string element_name
)function isType
template <typename T >
inline bool isType() constCheck if this type matches a specific type.
Template Parameters:
- T The type to check against
Return: True if the column is of type T
function hasElementType
template <typename T >
inline bool hasElementType() constCheck if the element type matches a specific type.
Template Parameters:
- T The element type to check against
Return: True if the column elements are of type T
function fromType
template <typename T >
static inline ColumnTypeInfo fromType()Create ColumnTypeInfo from a template type.
Template Parameters:
- T The column data type
Return: ColumnTypeInfo describing the type
Public Attributes Documentation
variable actualType
std::type_index actualType;The actual std::type_index of the column data.
variable elementType
std::type_index elementType;For vectors, the element type; same as actualType for scalars.
variable isVectorType
bool isVectorType;True if the type is std::vector
variable isNestedVector
bool isNestedVector;True if the type is std::vector<std::vector
variable typeName
std::string typeName;Human-readable type name.
variable elementTypeName
std::string elementTypeName;Human-readable element type name.
Updated on 2026-11-13 at 20:25:39 +0000