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

Public Member Functions

 TemporalFormat (const char *pattern)
bool is_valid () const
void set_year_part_index (int32_t index)
void set_month_part_index (int32_t index)
void set_day_part_index (int32_t index)
void set_hour_part_index (int32_t index)
void set_minute_part_index (int32_t index)
void set_second_part_index (int32_t index)
void set_usecond_part_index (int32_t index)
void set_nsecond_part_index (int32_t index)
bool matches (const char *data, size_t data_len, Temporal *to)

Protected Attributes

const char * _pattern
pcre2_code * _re
PCRE2_SIZE _error_offset
int32_t _error
uint32_t _year_part_index
uint32_t _month_part_index
uint32_t _day_part_index
uint32_t _hour_part_index
uint32_t _minute_part_index
uint32_t _second_part_index
uint32_t _usecond_part_index
uint32_t _nsecond_part_index

Detailed Description

Definition at line 38 of file temporal_format.h.

Constructor & Destructor Documentation

◆ TemporalFormat()

drizzled::TemporalFormat::TemporalFormat ( const char * pattern)

Constructor which takes a regex string as it's only parameter.

Parameters
Patternto use in matching

Definition at line 45 of file temporal_format.cc.

◆ ~TemporalFormat()

drizzled::TemporalFormat::~TemporalFormat ( )

Definition at line 67 of file temporal_format.cc.

Member Function Documentation

◆ is_valid()

bool drizzled::TemporalFormat::is_valid ( ) const
inline

Returns whether the instance is compiled and contains a valid regular expression.

Definition at line 69 of file temporal_format.h.

◆ matches()

bool drizzled::TemporalFormat::matches ( const char * data,
size_t data_len,
Temporal * to )

Returns true or false whether a supplied string matches the internal pattern for this temporal format string.

Parameters
Subjectto match
Lengthof subject string

Definition at line 73 of file temporal_format.cc.

◆ set_day_part_index()

void drizzled::TemporalFormat::set_day_part_index ( int32_t index)
inline

Sets the index for the day part of the pattern.

Parameters
indexof the temporal part

Definition at line 87 of file temporal_format.h.

◆ set_hour_part_index()

void drizzled::TemporalFormat::set_hour_part_index ( int32_t index)
inline

Sets the index for the hour part of the pattern.

Parameters
indexof the temporal part

Definition at line 93 of file temporal_format.h.

◆ set_minute_part_index()

void drizzled::TemporalFormat::set_minute_part_index ( int32_t index)
inline

Sets the index for the minute part of the pattern.

Parameters
indexof the temporal part

Definition at line 99 of file temporal_format.h.

◆ set_month_part_index()

void drizzled::TemporalFormat::set_month_part_index ( int32_t index)
inline

Sets the index for the month part of the pattern.

Parameters
indexof the temporal part

Definition at line 81 of file temporal_format.h.

◆ set_nsecond_part_index()

void drizzled::TemporalFormat::set_nsecond_part_index ( int32_t index)
inline

Sets the index for the nanosecond part of the pattern.

Parameters
indexof the temporal part

Definition at line 117 of file temporal_format.h.

◆ set_second_part_index()

void drizzled::TemporalFormat::set_second_part_index ( int32_t index)
inline

Sets the index for the second part of the pattern.

Parameters
indexof the temporal part

Definition at line 105 of file temporal_format.h.

◆ set_usecond_part_index()

void drizzled::TemporalFormat::set_usecond_part_index ( int32_t index)
inline

Sets the index for the microsecond part of the pattern.

Parameters
indexof the temporal part

Definition at line 111 of file temporal_format.h.

◆ set_year_part_index()

void drizzled::TemporalFormat::set_year_part_index ( int32_t index)
inline

Sets the index for the year part of the pattern.

Parameters
indexof the temporal part

Definition at line 75 of file temporal_format.h.

Member Data Documentation

◆ _day_part_index

uint32_t drizzled::TemporalFormat::_day_part_index
protected

Definition at line 48 of file temporal_format.h.

◆ _error

int32_t drizzled::TemporalFormat::_error
protected

Definition at line 44 of file temporal_format.h.

◆ _error_offset

PCRE2_SIZE drizzled::TemporalFormat::_error_offset
protected

Any error encountered during compilation or matching

Definition at line 43 of file temporal_format.h.

◆ _hour_part_index

uint32_t drizzled::TemporalFormat::_hour_part_index
protected

Definition at line 49 of file temporal_format.h.

◆ _minute_part_index

uint32_t drizzled::TemporalFormat::_minute_part_index
protected

Definition at line 50 of file temporal_format.h.

◆ _month_part_index

uint32_t drizzled::TemporalFormat::_month_part_index
protected

Definition at line 47 of file temporal_format.h.

◆ _nsecond_part_index

uint32_t drizzled::TemporalFormat::_nsecond_part_index
protected

Definition at line 53 of file temporal_format.h.

◆ _pattern

const char* drizzled::TemporalFormat::_pattern
protected

The regular expression string to match

Definition at line 41 of file temporal_format.h.

◆ _re

pcre2_code* drizzled::TemporalFormat::_re
protected

The compiled regular expression struct

Definition at line 42 of file temporal_format.h.

◆ _second_part_index

uint32_t drizzled::TemporalFormat::_second_part_index
protected

Definition at line 51 of file temporal_format.h.

◆ _usecond_part_index

uint32_t drizzled::TemporalFormat::_usecond_part_index
protected

Definition at line 52 of file temporal_format.h.

◆ _year_part_index

uint32_t drizzled::TemporalFormat::_year_part_index
protected

Definition at line 46 of file temporal_format.h.


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