Type used to represent a TIMESTAMP. timestamp_t holds the microseconds since 1970-01-01.
More...
#include <duckdb.hpp>
Type used to represent a TIMESTAMP. timestamp_t holds the microseconds since 1970-01-01.
◆ timestamp_t()
| duckdb::timestamp_t::timestamp_t |
( |
int64_t | micros | ) |
|
|
inlineexplicitconstexpr |
4139 : value(micros) {
4140 }
◆ operator=()
4141 {
4142 value = micros;
4143 return *this;
4144 }
◆ operator int64_t()
| duckdb::timestamp_t::operator int64_t |
( |
| ) |
const |
|
inlineexplicit |
4147 {
4148 return value;
4149 }
◆ operator==()
| bool duckdb::timestamp_t::operator== |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4152 {
4153 return value == rhs.value;
4154 };
◆ operator!=()
| bool duckdb::timestamp_t::operator!= |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4155 {
4156 return value != rhs.value;
4157 };
◆ operator<=()
| bool duckdb::timestamp_t::operator<= |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4158 {
4159 return value <= rhs.value;
4160 };
◆ operator<()
| bool duckdb::timestamp_t::operator< |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4161 {
4162 return value < rhs.value;
4163 };
◆ operator>()
| bool duckdb::timestamp_t::operator> |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4164 {
4165 return value > rhs.value;
4166 };
◆ operator>=()
| bool duckdb::timestamp_t::operator>= |
( |
const timestamp_t & | rhs | ) |
const |
|
inline |
4167 {
4168 return value >= rhs.value;
4169 };
◆ operator+()
| timestamp_t duckdb::timestamp_t::operator+ |
( |
const double & | value | ) |
const |
129442 {
129443 timestamp_t result;
129444 if (!TryAddOperator::Operation(this->value,
int64_t(value), result.value)) {
129445 throw OutOfRangeException("Overflow in timestamp addition");
129446 }
129447 return result;
129448}
◆ operator-()
129450 {
129452 if (!TrySubtractOperator::Operation(value,
int64_t(other.value), result)) {
129453 throw OutOfRangeException("Overflow in timestamp subtraction");
129454 }
129455 return result;
129456}
◆ operator+=()
129459 {
129460 if (!TryAddOperator::Operation(value, delta, value)) {
129461 throw OutOfRangeException("Overflow in timestamp increment");
129462 }
129463 return *this;
129464}
◆ operator-=()
129466 {
129467 if (!TrySubtractOperator::Operation(value, delta, value)) {
129468 throw OutOfRangeException("Overflow in timestamp decrement");
129469 }
129470 return *this;
129471}
◆ infinity()
| constexpr timestamp_t duckdb::timestamp_t::infinity |
( |
| ) |
|
|
inlinestaticconstexpr |
4180 {
4181 return timestamp_t(NumericLimits<int64_t>::Maximum());
4182 }
◆ ninfinity()
| constexpr timestamp_t duckdb::timestamp_t::ninfinity |
( |
| ) |
|
|
inlinestaticconstexpr |
4183 {
4184 return timestamp_t(-NumericLimits<int64_t>::Maximum());
4185 }
◆ epoch()
4186 {
4187 return timestamp_t(0);
4188 }
The documentation for this struct was generated from the following files: