iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
iceberg::DecimalType Class Reference

A data type representing a fixed-precision decimal. More...

#include <type.h>

Inheritance diagram for iceberg::DecimalType:
iceberg::PrimitiveType iceberg::Type iceberg::util::Formattable

Public Member Functions

 DecimalType (int32_t precision, int32_t scale)
 Construct a decimal type with the given precision and scale.
 
int32_t precision () const
 Get the precision (the number of decimal digits).
 
int32_t scale () const
 Get the scale (essentially, the number of decimal digits after the decimal point; precisely, the value is scaled by $$10^{-s}$$.).
 
TypeId type_id () const override
 Get the type ID.
 
std::string ToString () const override
 Get a user-readable string representation.
 
- Public Member Functions inherited from iceberg::PrimitiveType
bool is_primitive () const override
 Is this a primitive type (may not have child fields)?
 
bool is_nested () const override
 Is this a nested type (may have child fields)?
 

Static Public Attributes

static constexpr const TypeId kTypeId = TypeId::kDecimal
 
static constexpr const int32_t kMaxPrecision = 38
 

Protected Member Functions

bool Equals (const Type &other) const override
 Compare two types for equality.
 

Detailed Description

A data type representing a fixed-precision decimal.

Member Function Documentation

◆ Equals()

bool iceberg::DecimalType::Equals ( const Type other) const
overrideprotectedvirtual

Compare two types for equality.

Implements iceberg::Type.

◆ ToString()

std::string iceberg::DecimalType::ToString ( ) const
overridevirtual

Get a user-readable string representation.

Implements iceberg::util::Formattable.

◆ type_id()

TypeId iceberg::DecimalType::type_id ( ) const
overridevirtual

Get the type ID.

Implements iceberg::Type.


The documentation for this class was generated from the following files: