Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::common::Interval Class Reference

#include <interval_t.h>

Static Public Member Functions

static KUZU_API void addition (interval_t &result, uint64_t number, std::string specifierStr)
 
static KUZU_API interval_t fromCString (const char *str, uint64_t len)
 
static KUZU_API std::string toString (interval_t interval)
 
static KUZU_API bool greaterThan (const interval_t &left, const interval_t &right)
 
static KUZU_API void normalizeIntervalEntries (interval_t input, int64_t &months, int64_t &days, int64_t &micros)
 
static KUZU_API void tryGetDatePartSpecifier (std::string specifier, DatePartSpecifier &result)
 
static KUZU_API int32_t getIntervalPart (DatePartSpecifier specifier, interval_t &timestamp)
 
static KUZU_API int64_t getMicro (const interval_t &val)
 
static KUZU_API int64_t getNanoseconds (const interval_t &val)
 

Static Public Attributes

static constexpr const int32_t MONTHS_PER_MILLENIUM = 12000
 
static constexpr const int32_t MONTHS_PER_CENTURY = 1200
 
static constexpr const int32_t MONTHS_PER_DECADE = 120
 
static constexpr const int32_t MONTHS_PER_YEAR = 12
 
static constexpr const int32_t MONTHS_PER_QUARTER = 3
 
static constexpr const int32_t DAYS_PER_WEEK = 7
 
static constexpr const int64_t DAYS_PER_MONTH = 30
 only used for interval comparison/ordering purposes, in which case a month counts as 30 days
 
static constexpr const int64_t DAYS_PER_YEAR = 365
 
static constexpr const int64_t MSECS_PER_SEC = 1000
 
static constexpr const int32_t SECS_PER_MINUTE = 60
 
static constexpr const int32_t MINS_PER_HOUR = 60
 
static constexpr const int32_t HOURS_PER_DAY = 24
 
static constexpr const int32_t SECS_PER_HOUR = SECS_PER_MINUTE * MINS_PER_HOUR
 
static constexpr const int32_t SECS_PER_DAY = SECS_PER_HOUR * HOURS_PER_DAY
 
static constexpr const int32_t SECS_PER_WEEK = SECS_PER_DAY * DAYS_PER_WEEK
 
static constexpr const int64_t MICROS_PER_MSEC = 1000
 
static constexpr const int64_t MICROS_PER_SEC = MICROS_PER_MSEC * MSECS_PER_SEC
 
static constexpr const int64_t MICROS_PER_MINUTE = MICROS_PER_SEC * SECS_PER_MINUTE
 
static constexpr const int64_t MICROS_PER_HOUR = MICROS_PER_MINUTE * MINS_PER_HOUR
 
static constexpr const int64_t MICROS_PER_DAY = MICROS_PER_HOUR * HOURS_PER_DAY
 
static constexpr const int64_t MICROS_PER_WEEK = MICROS_PER_DAY * DAYS_PER_WEEK
 
static constexpr const int64_t MICROS_PER_MONTH = MICROS_PER_DAY * DAYS_PER_MONTH
 
static constexpr const int64_t NANOS_PER_MICRO = 1000
 
static constexpr const int64_t NANOS_PER_MSEC = NANOS_PER_MICRO * MICROS_PER_MSEC
 
static constexpr const int64_t NANOS_PER_SEC = NANOS_PER_MSEC * MSECS_PER_SEC
 
static constexpr const int64_t NANOS_PER_MINUTE = NANOS_PER_SEC * SECS_PER_MINUTE
 
static constexpr const int64_t NANOS_PER_HOUR = NANOS_PER_MINUTE * MINS_PER_HOUR
 
static constexpr const int64_t NANOS_PER_DAY = NANOS_PER_HOUR * HOURS_PER_DAY
 
static constexpr const int64_t NANOS_PER_WEEK = NANOS_PER_DAY * DAYS_PER_WEEK
 

Member Function Documentation

◆ addition()

static KUZU_API void kuzu::common::Interval::addition ( interval_t & result,
uint64_t number,
std::string specifierStr )
static

◆ fromCString()

static KUZU_API interval_t kuzu::common::Interval::fromCString ( const char * str,
uint64_t len )
static

◆ getIntervalPart()

static KUZU_API int32_t kuzu::common::Interval::getIntervalPart ( DatePartSpecifier specifier,
interval_t & timestamp )
static

◆ getMicro()

static KUZU_API int64_t kuzu::common::Interval::getMicro ( const interval_t & val)
static

◆ getNanoseconds()

static KUZU_API int64_t kuzu::common::Interval::getNanoseconds ( const interval_t & val)
static

◆ greaterThan()

static KUZU_API bool kuzu::common::Interval::greaterThan ( const interval_t & left,
const interval_t & right )
static

◆ normalizeIntervalEntries()

static KUZU_API void kuzu::common::Interval::normalizeIntervalEntries ( interval_t input,
int64_t & months,
int64_t & days,
int64_t & micros )
static

◆ toString()

static KUZU_API std::string kuzu::common::Interval::toString ( interval_t interval)
static

◆ tryGetDatePartSpecifier()

static KUZU_API void kuzu::common::Interval::tryGetDatePartSpecifier ( std::string specifier,
DatePartSpecifier & result )
static

Member Data Documentation

◆ DAYS_PER_MONTH

const int64_t kuzu::common::Interval::DAYS_PER_MONTH = 30
staticconstexpr

only used for interval comparison/ordering purposes, in which case a month counts as 30 days

◆ DAYS_PER_WEEK

const int32_t kuzu::common::Interval::DAYS_PER_WEEK = 7
staticconstexpr

◆ DAYS_PER_YEAR

const int64_t kuzu::common::Interval::DAYS_PER_YEAR = 365
staticconstexpr

◆ HOURS_PER_DAY

const int32_t kuzu::common::Interval::HOURS_PER_DAY = 24
staticconstexpr

◆ MICROS_PER_DAY

const int64_t kuzu::common::Interval::MICROS_PER_DAY = MICROS_PER_HOUR * HOURS_PER_DAY
staticconstexpr

◆ MICROS_PER_HOUR

const int64_t kuzu::common::Interval::MICROS_PER_HOUR = MICROS_PER_MINUTE * MINS_PER_HOUR
staticconstexpr

◆ MICROS_PER_MINUTE

const int64_t kuzu::common::Interval::MICROS_PER_MINUTE = MICROS_PER_SEC * SECS_PER_MINUTE
staticconstexpr

◆ MICROS_PER_MONTH

const int64_t kuzu::common::Interval::MICROS_PER_MONTH = MICROS_PER_DAY * DAYS_PER_MONTH
staticconstexpr

◆ MICROS_PER_MSEC

const int64_t kuzu::common::Interval::MICROS_PER_MSEC = 1000
staticconstexpr

◆ MICROS_PER_SEC

const int64_t kuzu::common::Interval::MICROS_PER_SEC = MICROS_PER_MSEC * MSECS_PER_SEC
staticconstexpr

◆ MICROS_PER_WEEK

const int64_t kuzu::common::Interval::MICROS_PER_WEEK = MICROS_PER_DAY * DAYS_PER_WEEK
staticconstexpr

◆ MINS_PER_HOUR

const int32_t kuzu::common::Interval::MINS_PER_HOUR = 60
staticconstexpr

◆ MONTHS_PER_CENTURY

const int32_t kuzu::common::Interval::MONTHS_PER_CENTURY = 1200
staticconstexpr

◆ MONTHS_PER_DECADE

const int32_t kuzu::common::Interval::MONTHS_PER_DECADE = 120
staticconstexpr

◆ MONTHS_PER_MILLENIUM

const int32_t kuzu::common::Interval::MONTHS_PER_MILLENIUM = 12000
staticconstexpr

◆ MONTHS_PER_QUARTER

const int32_t kuzu::common::Interval::MONTHS_PER_QUARTER = 3
staticconstexpr

◆ MONTHS_PER_YEAR

const int32_t kuzu::common::Interval::MONTHS_PER_YEAR = 12
staticconstexpr

◆ MSECS_PER_SEC

const int64_t kuzu::common::Interval::MSECS_PER_SEC = 1000
staticconstexpr

◆ NANOS_PER_DAY

const int64_t kuzu::common::Interval::NANOS_PER_DAY = NANOS_PER_HOUR * HOURS_PER_DAY
staticconstexpr

◆ NANOS_PER_HOUR

const int64_t kuzu::common::Interval::NANOS_PER_HOUR = NANOS_PER_MINUTE * MINS_PER_HOUR
staticconstexpr

◆ NANOS_PER_MICRO

const int64_t kuzu::common::Interval::NANOS_PER_MICRO = 1000
staticconstexpr

◆ NANOS_PER_MINUTE

const int64_t kuzu::common::Interval::NANOS_PER_MINUTE = NANOS_PER_SEC * SECS_PER_MINUTE
staticconstexpr

◆ NANOS_PER_MSEC

const int64_t kuzu::common::Interval::NANOS_PER_MSEC = NANOS_PER_MICRO * MICROS_PER_MSEC
staticconstexpr

◆ NANOS_PER_SEC

const int64_t kuzu::common::Interval::NANOS_PER_SEC = NANOS_PER_MSEC * MSECS_PER_SEC
staticconstexpr

◆ NANOS_PER_WEEK

const int64_t kuzu::common::Interval::NANOS_PER_WEEK = NANOS_PER_DAY * DAYS_PER_WEEK
staticconstexpr

◆ SECS_PER_DAY

const int32_t kuzu::common::Interval::SECS_PER_DAY = SECS_PER_HOUR * HOURS_PER_DAY
staticconstexpr

◆ SECS_PER_HOUR

const int32_t kuzu::common::Interval::SECS_PER_HOUR = SECS_PER_MINUTE * MINS_PER_HOUR
staticconstexpr

◆ SECS_PER_MINUTE

const int32_t kuzu::common::Interval::SECS_PER_MINUTE = 60
staticconstexpr

◆ SECS_PER_WEEK

const int32_t kuzu::common::Interval::SECS_PER_WEEK = SECS_PER_DAY * DAYS_PER_WEEK
staticconstexpr

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