Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::Decimal Class Reference

The Decimal class is a static class that holds helper functions for the Decimal type. More...

#include <duckdb.hpp>

Static Public Member Functions

static string ToString (int16_t value, uint8_t width, uint8_t scale)
static string ToString (int32_t value, uint8_t width, uint8_t scale)
static string ToString (int64_t value, uint8_t width, uint8_t scale)
static string ToString (hugeint_t value, uint8_t width, uint8_t scale)

Static Public Attributes

static constexpr uint8_t MAX_WIDTH_INT16 = DecimalWidth<int16_t>::max
static constexpr uint8_t MAX_WIDTH_INT32 = DecimalWidth<int32_t>::max
static constexpr uint8_t MAX_WIDTH_INT64 = DecimalWidth<int64_t>::max
static constexpr uint8_t MAX_WIDTH_INT128 = DecimalWidth<hugeint_t>::max
static constexpr uint8_t MAX_WIDTH_DECIMAL = MAX_WIDTH_INT128

Detailed Description

The Decimal class is a static class that holds helper functions for the Decimal type.

Member Function Documentation

◆ ToString() [1/4]

string duckdb::Decimal::ToString ( int16_t value,
uint8_t width,
uint8_t scale )
static
117796 {
117797 return TemplatedDecimalToString<int16_t>(value, width, scale);
117798}

◆ ToString() [2/4]

string duckdb::Decimal::ToString ( int32_t value,
uint8_t width,
uint8_t scale )
static
117800 {
117801 return TemplatedDecimalToString<int32_t>(value, width, scale);
117802}

◆ ToString() [3/4]

string duckdb::Decimal::ToString ( int64_t value,
uint8_t width,
uint8_t scale )
static
117804 {
117805 return TemplatedDecimalToString<int64_t>(value, width, scale);
117806}

◆ ToString() [4/4]

string duckdb::Decimal::ToString ( hugeint_t value,
uint8_t width,
uint8_t scale )
static
117808 {
117809 auto len = DecimalToString::DecimalLength(value, width, scale);
117810 auto data = make_unsafe_uniq_array_uninitialized<char>(UnsafeNumericCast<size_t>(len + 1));
117811 DecimalToString::FormatDecimal(value, width, scale, data.get(), UnsafeNumericCast<idx_t>(len));
117812 return string(data.get(), UnsafeNumericCast<uint32_t>(len));
117813}

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