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

Public Member Functions

template<>
DUCKDB_API bool Operation (string_t input, timestamp_t &result, bool strict)
template<>
DUCKDB_API bool Operation (date_t input, timestamp_t &result, bool strict)
template<>
bool Operation (string_t input, timestamp_t &result, bool strict)
template<>
bool Operation (date_t input, timestamp_t &result, bool strict)

Static Public Member Functions

template<class SRC, class DST>
static bool Operation (SRC input, DST &result, bool strict=false)

Member Function Documentation

◆ Operation() [1/3]

template<class SRC, class DST>
bool duckdb::TryCastToTimestampSec::Operation ( SRC input,
DST & result,
bool strict = false )
inlinestatic
31898 {
31899 throw InternalException("Unsupported type for try cast to timestamp (s)");
31900 }

◆ Operation() [2/3]

template<>
bool duckdb::TryCastToTimestampSec::Operation ( string_t input,
timestamp_t & result,
bool strict )
89972 {
89973 if (!TryCast::Operation<string_t, timestamp_t>(input, result, strict)) {
89974 return false;
89975 }
89976 result = CastTimestampUsToSec::Operation<timestamp_t, timestamp_t>(result);
89977 return true;
89978}

◆ Operation() [3/3]

template<>
bool duckdb::TryCastToTimestampSec::Operation ( date_t input,
timestamp_t & result,
bool strict )
90007 {
90008 if (!TryCast::Operation<date_t, timestamp_t>(input, result, strict)) {
90009 return false;
90010 }
90011 if (!Timestamp::IsFinite(result)) {
90012 return true;
90013 }
90014 result.value /= Interval::MICROS_PER_MSEC * Interval::MSECS_PER_SEC;
90015 return true;
90016}
static bool IsFinite(timestamp_t timestamp)
True, if the timestamp is finite, else false.
Definition duckdb.hpp:4287

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