|
| template<class SRC, class DST> |
| static bool | Operation (SRC input, DST &result, bool strict=false) |
◆ 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 }
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: