iceberg-cpp
Loading...
Searching...
No Matches
Functions
Factory functions for creating primitive data types

Functions

ICEBERG_EXPORT const std::shared_ptr< BooleanType > & iceberg::boolean ()
 Return a BooleanType instance.
 
ICEBERG_EXPORT const std::shared_ptr< IntType > & iceberg::int32 ()
 Return an IntType instance.
 
ICEBERG_EXPORT const std::shared_ptr< LongType > & iceberg::int64 ()
 Return a LongType instance.
 
ICEBERG_EXPORT const std::shared_ptr< FloatType > & iceberg::float32 ()
 Return a FloatType instance.
 
ICEBERG_EXPORT const std::shared_ptr< DoubleType > & iceberg::float64 ()
 Return a DoubleType instance.
 
ICEBERG_EXPORT const std::shared_ptr< DateType > & iceberg::date ()
 Return a DateType instance.
 
ICEBERG_EXPORT const std::shared_ptr< TimeType > & iceberg::time ()
 Return a TimeType instance.
 
ICEBERG_EXPORT const std::shared_ptr< TimestampType > & iceberg::timestamp ()
 Return a TimestampType instance.
 
ICEBERG_EXPORT const std::shared_ptr< TimestampTzType > & iceberg::timestamp_tz ()
 Return a TimestampTzType instance.
 
ICEBERG_EXPORT const std::shared_ptr< BinaryType > & iceberg::binary ()
 Return a BinaryType instance.
 
ICEBERG_EXPORT const std::shared_ptr< StringType > & iceberg::string ()
 Return a StringType instance.
 
ICEBERG_EXPORT const std::shared_ptr< UuidType > & iceberg::uuid ()
 Return a UuidType instance.
 
std::shared_ptr< DecimalTypeiceberg::decimal (int32_t precision, int32_t scale)
 Create a DecimalType with the given precision and scale.
 
std::shared_ptr< FixedTypeiceberg::fixed (int32_t length)
 Create a FixedType with the given length.
 
std::shared_ptr< StructTypeiceberg::struct_ (std::vector< SchemaField > fields)
 Create a StructType with the given fields.
 
std::shared_ptr< ListTypeiceberg::list (SchemaField element)
 Create a ListType with the given element field.
 
std::shared_ptr< MapTypeiceberg::map (SchemaField key, SchemaField value)
 Create a MapType with the given key and value fields.
 

Detailed Description

Factory functions for creating primitive data types

Function Documentation

◆ decimal()

ICEBERG_EXPORT std::shared_ptr< DecimalType > iceberg::decimal ( int32_t  precision,
int32_t  scale 
)

Create a DecimalType with the given precision and scale.

Parameters
precisionThe number of decimal digits (max 38).
scaleThe number of decimal digits after the decimal point.
Returns
A shared pointer to the DecimalType instance.

◆ fixed()

ICEBERG_EXPORT std::shared_ptr< FixedType > iceberg::fixed ( int32_t  length)

Create a FixedType with the given length.

Parameters
lengthThe number of bytes to store (must be >= 0).
Returns
A shared pointer to the FixedType instance.

◆ list()

ICEBERG_EXPORT std::shared_ptr< ListType > iceberg::list ( SchemaField  element)

Create a ListType with the given element field.

Parameters
elementThe element field of the list.
Returns
A shared pointer to the ListType instance.

◆ map()

ICEBERG_EXPORT std::shared_ptr< MapType > iceberg::map ( SchemaField  key,
SchemaField  value 
)

Create a MapType with the given key and value fields.

Parameters
keyThe key field of the map.
valueThe value field of the map.
Returns
A shared pointer to the MapType instance.

◆ struct_()

ICEBERG_EXPORT std::shared_ptr< StructType > iceberg::struct_ ( std::vector< SchemaField fields)

Create a StructType with the given fields.

Parameters
fieldsThe fields of the struct.
Returns
A shared pointer to the StructType instance.