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::Cast Struct Reference

Public Member Functions

template<>
date_t Operation (string_t input)
template<>
dtime_t Operation (string_t input)
template<>
dtime_ns_t Operation (string_t input)
template<>
dtime_tz_t Operation (string_t input)
template<>
timestamp_t Operation (string_t input)
template<>
timestamp_tz_t Operation (string_t input)
template<>
timestamp_ns_t Operation (string_t input)
template<>
date_t Operation (string_t input)
template<>
dtime_t Operation (string_t input)
template<>
dtime_ns_t Operation (string_t input)
template<>
dtime_tz_t Operation (string_t input)
template<>
timestamp_t Operation (string_t input)
template<>
timestamp_tz_t Operation (string_t input)
template<>
timestamp_ns_t Operation (string_t input)

Static Public Member Functions

template<class SRC, class DST>
static DST Operation (SRC input)

Member Function Documentation

◆ Operation() [1/8]

template<class SRC, class DST>
DST duckdb::Cast::Operation ( SRC input)
inlinestatic
31245 {
31246 DST result;
31247 if (!TryCast::Operation(input, result)) {
31248 throw InvalidInputException(CastExceptionText<SRC, DST>(input));
31249 }
31250 return result;
31251 }

◆ Operation() [2/8]

template<>
date_t duckdb::Cast::Operation ( string_t input)
90254 {
90255 return Date::FromCString(input.GetData(), input.GetSize());
90256}
static DUCKDB_API date_t FromCString(const char *str, idx_t len, bool strict=false)
Convert a string in the format "YYYY-MM-DD" to a date object.
Definition duckdb.cpp:117506

◆ Operation() [3/8]

template<>
dtime_t duckdb::Cast::Operation ( string_t input)
90277 {
90278 return Time::FromCString(input.GetData(), input.GetSize());
90279}

◆ Operation() [4/8]

template<>
dtime_ns_t duckdb::Cast::Operation ( string_t input)
90308 {
90309 dtime_ns_t result;
90310 if (!TryCast::Operation(input, result, false)) {
90311 throw ConversionException(Time::ConversionError(input));
90312 }
90313 return result;
90314}

◆ Operation() [5/8]

template<>
dtime_tz_t duckdb::Cast::Operation ( string_t input)
90336 {
90337 dtime_tz_t result;
90338 if (!TryCast::Operation(input, result, false)) {
90339 throw ConversionException(Time::ConversionError(input));
90340 }
90341 return result;
90342}

◆ Operation() [6/8]

template<>
timestamp_t duckdb::Cast::Operation ( string_t input)
90403 {
90404 return Timestamp::FromCString(input.GetData(), input.GetSize(), false);
90405}

◆ Operation() [7/8]

template<>
timestamp_tz_t duckdb::Cast::Operation ( string_t input)
90408 {
90409 return timestamp_tz_t(Timestamp::FromCString(input.GetData(), input.GetSize(), true));
90410}

◆ Operation() [8/8]

template<>
timestamp_ns_t duckdb::Cast::Operation ( string_t input)
90413 {
90414 int32_t nanos;
90415 const auto ts = Timestamp::FromCString(input.GetData(), input.GetSize(), false, &nanos);
90416 timestamp_ns_t result;
90417 if (!Timestamp::TryFromTimestampNanos(ts, nanos, result)) {
90418 throw ConversionException(Timestamp::RangeError(input));
90419 }
90420 return result;
90421}
static DUCKDB_API bool TryFromTimestampNanos(timestamp_t ts, int32_t nanos, timestamp_ns_t &result)
Scale up to ns.
Definition duckdb.cpp:129588
::int32_t int32_t

The documentation for this struct was generated from the following file: