The date range query finds documents containing a date value in the specified field within the specified range. More...
#include <couchbase/date_range_query.hxx>
Public Member Functions | |
auto | start (std::chrono::system_clock::time_point value) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | start (std::tm value) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | start (std::chrono::system_clock::time_point value, bool inclusive) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | start (std::tm value, bool inclusive) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | start (std::string value) -> date_range_query & |
Set preformatted date as lower limit. | |
auto | start (std::string value, bool inclusive) -> date_range_query & |
Set preformatted date as lower limit. | |
auto | end (std::chrono::system_clock::time_point value) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | end (std::tm value) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | end (std::chrono::system_clock::time_point value, bool inclusive) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | end (std::tm value, bool inclusive) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server. | |
auto | end (std::string value) |
Set preformatted date as upper limit. | |
auto | end (std::string value, bool inclusive) -> date_range_query & |
Set preformatted date as upper limit. | |
auto | date_time_parser (std::string parser_name) -> date_range_query & |
Enable custom date parser. | |
auto | field (std::string field_name) -> date_range_query & |
If a field is specified, only terms in that field will be matched. | |
auto | encode () const -> encoded_search_query override |
![]() | |
virtual | ~search_query ()=default |
template<typename derived_query = search_query, std::enable_if_t< std::is_base_of_v< search_query, derived_query >, bool > = true> | |
auto | boost (double boost) -> derived_query & |
The boost parameter is used to increase the relative weight of a clause (with a boost greater than 1) or decrease the relative weight (with a boost between 0 and 1). | |
Additional Inherited Members | |
![]() | |
search_query ()=default | |
![]() | |
std::optional< double > | boost_ {} |
The date range query finds documents containing a date value in the specified field within the specified range.
Either start or end can be omitted, but not both.
Match documents where field review_date
falls within the range ("2001-10-09T10:20:30-08:00", "2016-10-31")
It also works with std::tm
and std::chrono::system_clock::time_point
.
|
inline |
Enable custom date parser.
parser_name | name of the custom date parser |
|
nodiscardoverridevirtual |
Implements search_query.
auto end | ( | std::chrono::system_clock::time_point | value | ) | -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server.
value | end limit time point |
auto end | ( | std::chrono::system_clock::time_point | value, |
bool | inclusive ) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server.
value | end limit time point |
inclusive | whether to include limit value into the interval. |
|
inline |
Set preformatted date as upper limit.
value | end limit formatted as a string, use date_time_parser() for non-standard formats |
|
inline |
Set preformatted date as upper limit.
value | end limit formatted as a string, use date_time_parser() for non-standard formats |
inclusive | whether to include limit value into the interval. |
auto end | ( | std::tm | value | ) | -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server.
value | end limit as a tm (broken down timestamp) |
auto end | ( | std::tm | value, |
bool | inclusive ) -> date_range_query & |
Set upper limit and automatically format so that default date_time parser will be able to parse it on the server.
value | end limit as a tm (broken down timestamp) |
inclusive | whether to include limit value into the interval. |
|
inline |
If a field is specified, only terms in that field will be matched.
field_name | name of the field to be matched |
auto start | ( | std::chrono::system_clock::time_point | value | ) | -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server.
value | start limit time point |
auto start | ( | std::chrono::system_clock::time_point | value, |
bool | inclusive ) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server.
value | start limit time point |
inclusive | whether to include limit value into the interval. |
|
inline |
Set preformatted date as lower limit.
value | start limit formatted as a string, use date_time_parser() for non-standard formats |
|
inline |
Set preformatted date as lower limit.
value | start limit formatted as a string, use date_time_parser() for non-standard formats |
inclusive | whether to include limit value into the interval. |
auto start | ( | std::tm | value | ) | -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server.
value | start limit as a tm (broken down timestamp) |
auto start | ( | std::tm | value, |
bool | inclusive ) -> date_range_query & |
Set lower limit and automatically format so that default date_time parser will be able to parse it on the server.
value | start limit as a tm (broken down timestamp) |
inclusive | whether to include limit value into the interval. |