drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::Timestamp Class Reference

#include <temporal.h>

Inheritance diagram for drizzled::Timestamp:
[legend]
Collaboration diagram for drizzled::Timestamp:
[legend]

Public Member Functions

bool operator== (const Date &rhs)
bool operator!= (const Date &rhs)
bool operator> (const Date &rhs)
bool operator>= (const Date &rhs)
bool operator< (const Date &rhs)
bool operator<= (const Date &rhs)
bool operator== (const DateTime &rhs)
bool operator!= (const DateTime &rhs)
bool operator> (const DateTime &rhs)
bool operator>= (const DateTime &rhs)
bool operator< (const DateTime &rhs)
bool operator<= (const DateTime &rhs)
bool operator== (const Timestamp &rhs)
bool operator!= (const Timestamp &rhs)
bool operator> (const Timestamp &rhs)
bool operator>= (const Timestamp &rhs)
bool operator< (const Timestamp &rhs)
bool operator<= (const Timestamp &rhs)
bool is_valid_timestamp () const
virtual bool is_valid () const
void to_time_t (time_t &to) const
Public Member Functions inherited from drizzled::DateTime
bool in_unix_epoch () const
void to_int32_t (int32_t *) const
bool from_int32_t (int32_t)
virtual int to_string (char *to, size_t to_len) const
bool from_string (const char *from, size_t from_len)
void to_int64_t (int64_t *to) const
bool from_time_t (const time_t from)
bool from_timeval (struct timeval &_timeval)
bool from_int64_t (const int64_t from, bool convert)
bool from_int64_t (const int64_t from)
void to_tm (struct tm *to) const
void to_decimal (type::Decimal *to) const
Public Member Functions inherited from drizzled::Date
const Date operator- (const Date &rhs)
const Date operator+ (const Date &rhs)
Date & operator+= (const Date &rhs)
Date & operator-= (const Date &rhs)
const Date operator- (const Time &rhs)
const Date operator+ (const Time &rhs)
Date & operator-= (const Time &rhs)
Date & operator+= (const Time &rhs)
const Date operator- (const DateTime &rhs)
const Date operator+ (const DateTime &rhs)
Date & operator+= (const DateTime &rhs)
Date & operator-= (const DateTime &rhs)
Date & operator= (const DateTime &rhs)
virtual bool is_valid_date () const
virtual bool is_valid_datetime () const
virtual bool is_valid_time () const
void to_julian_day_number (int64_t *to) const
bool from_julian_day_number (const int64_t from)
virtual bool from_tm (const struct tm *from)
Public Member Functions inherited from drizzled::Temporal
enum calendar calendar () const
void set_nseconds (const uint32_t nsecond)
uint32_t nseconds () const
void set_useconds (const uint32_t usecond)
uint32_t useconds () const
void set_epoch_seconds ()
void set_epoch_seconds (const uint32_t epoch_second)
time_t epoch_seconds () const
void set_seconds (const uint32_t second)
uint32_t seconds () const
void set_minutes (const uint32_t minute)
uint32_t minutes () const
void set_hours (const uint32_t hour)
uint32_t hours () const
void set_days (const uint32_t day)
uint32_t days () const
void set_months (const uint32_t month)
uint32_t months () const
void set_years (const uint32_t year)
uint32_t years () const
bool overflow () const

Additional Inherited Members

Static Public Attributes inherited from drizzled::DateTime
static const int MAX_STRING_LENGTH = 27
Static Public Attributes inherited from drizzled::Date
static const int MAX_STRING_LENGTH = 11
Protected Member Functions inherited from drizzled::Temporal
uint64_t _cumulative_seconds_in_time () const
void _reset ()
Protected Attributes inherited from drizzled::Temporal
enum calendar _calendar
uint32_t _years
uint32_t _months
uint32_t _days
uint32_t _hours
uint32_t _minutes
uint32_t _seconds
time_t _epoch_seconds
uint32_t _useconds
uint32_t _nseconds
bool _overflow

Detailed Description

Class representing temporal components in the UNIX epoch

Definition at line 683 of file temporal.h.

Constructor & Destructor Documentation

◆ Timestamp()

drizzled::Timestamp::Timestamp ( )
inline

Definition at line 686 of file temporal.h.

Member Function Documentation

◆ is_valid()

bool drizzled::Timestamp::is_valid ( ) const
virtual

Returns whether the temporal value is valid timestamp.

Reimplemented from drizzled::DateTime.

Reimplemented in drizzled::MicroTimestamp, and drizzled::NanoTimestamp.

Definition at line 1355 of file temporal.cc.

◆ is_valid_timestamp()

bool drizzled::Timestamp::is_valid_timestamp ( ) const
inlinevirtual

Returns whether the temporal value is valid as a UNIX timestamp.

Reimplemented from drizzled::Date.

Definition at line 727 of file temporal.h.

◆ operator!=() [1/3]

bool drizzled::Timestamp::operator!= ( const Date & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 812 of file temporal.cc.

◆ operator!=() [2/3]

bool drizzled::Timestamp::operator!= ( const DateTime & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 850 of file temporal.cc.

◆ operator!=() [3/3]

bool drizzled::Timestamp::operator!= ( const Timestamp & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 902 of file temporal.cc.

◆ operator<() [1/3]

bool drizzled::Timestamp::operator< ( const Date & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 816 of file temporal.cc.

◆ operator<() [2/3]

bool drizzled::Timestamp::operator< ( const DateTime & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 854 of file temporal.cc.

◆ operator<() [3/3]

bool drizzled::Timestamp::operator< ( const Timestamp & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 906 of file temporal.cc.

◆ operator<=() [1/3]

bool drizzled::Timestamp::operator<= ( const Date & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 830 of file temporal.cc.

◆ operator<=() [2/3]

bool drizzled::Timestamp::operator<= ( const DateTime & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 883 of file temporal.cc.

◆ operator<=() [3/3]

bool drizzled::Timestamp::operator<= ( const Timestamp & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 910 of file temporal.cc.

◆ operator==() [1/3]

bool drizzled::Timestamp::operator== ( const Date & rhs)
virtual

Comparison operator overloads to compare this against a Date value.

Parameters
Timestampto compare against.

Reimplemented from drizzled::Date.

Definition at line 808 of file temporal.cc.

◆ operator==() [2/3]

bool drizzled::Timestamp::operator== ( const DateTime & rhs)
virtual

Comparison operator overloads to compare this against a DateTime value.

Parameters
DateTimeto compare against.

Reimplemented from drizzled::Date.

Definition at line 845 of file temporal.cc.

◆ operator==() [3/3]

bool drizzled::Timestamp::operator== ( const Timestamp & rhs)
virtual

Comparison operator overloads to compare this against another Timestamp value.

Parameters
Timestampto compare against.

Reimplemented from drizzled::Date.

Definition at line 898 of file temporal.cc.

◆ operator>() [1/3]

bool drizzled::Timestamp::operator> ( const Date & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 834 of file temporal.cc.

◆ operator>() [2/3]

bool drizzled::Timestamp::operator> ( const DateTime & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 887 of file temporal.cc.

◆ operator>() [3/3]

bool drizzled::Timestamp::operator> ( const Timestamp & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 914 of file temporal.cc.

◆ operator>=() [1/3]

bool drizzled::Timestamp::operator>= ( const Date & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 838 of file temporal.cc.

◆ operator>=() [2/3]

bool drizzled::Timestamp::operator>= ( const DateTime & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 891 of file temporal.cc.

◆ operator>=() [3/3]

bool drizzled::Timestamp::operator>= ( const Timestamp & rhs)
virtual

Reimplemented from drizzled::Date.

Definition at line 918 of file temporal.cc.

◆ to_time_t()

void drizzled::Timestamp::to_time_t ( time_t & to) const
virtual

Attempts to convert the Timestamp value into a supplied time_t.

Parameters
Pointerto a time_t to convert to

Reimplemented from drizzled::Date.

Definition at line 1298 of file temporal.cc.


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