MySQL 9.6.0
Source Code Documentation
interval_const_views.h
Go to the documentation of this file.
1// Copyright (c) 2025, Oracle and/or its affiliates.
2//
3// This program is free software; you can redistribute it and/or modify
4// it under the terms of the GNU General Public License, version 2.0,
5// as published by the Free Software Foundation.
6//
7// This program is designed to work with certain software (including
8// but not limited to OpenSSL) that is licensed under separate terms,
9// as designated in a particular file or component or in included license
10// documentation. The authors of MySQL hereby grant you an additional
11// permission to link the program and your derivative works with the
12// separately licensed software that they have either included with
13// the program or referenced in the documentation.
14//
15// This program is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License, version 2.0, for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this program; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
24#ifndef MYSQL_SETS_INTERVAL_CONST_VIEWS_H
25#define MYSQL_SETS_INTERVAL_CONST_VIEWS_H
26
27/// @file
28/// Experimental API header
29
30#include "mysql/sets/base_const_views.h" // Empty_set_view
31#include "mysql/sets/boundary_set_category.h" // Boundary_set_category_tag
32#include "mysql/sets/interval_set_category.h" // Interval_set_category_tag
33#include "mysql/sets/interval_set_interface.h" // Interval_set_interface
34
35/// @addtogroup GroupLibsMysqlSets
36/// @{
37
38namespace mysql::sets {
39
40/// View over the empty Interval set for the given Set traits.
41template <Is_bounded_set_traits Set_traits_tp>
44 Empty_set_view<Interval_set_category_tag, Set_traits_tp>,
45 Empty_set_view<Boundary_set_category_tag, Set_traits_tp>> {
46 public:
47 [[nodiscard]] const auto &boundaries() const {
48 return make_empty_set_view<Boundary_set_category_tag, Set_traits_tp>();
49 }
50};
51
52/// View over the Interval set containing the full range of values for
53/// the given Set traits.
54template <Is_bounded_set_traits Set_traits_tp>
57 Full_set_view<Interval_set_category_tag, Set_traits_tp>,
58 Full_set_view<Boundary_set_category_tag, Set_traits_tp>> {
59 public:
60 [[nodiscard]] const auto &boundaries() const {
61 return make_full_set_view<Boundary_set_category_tag, Set_traits_tp>();
62 }
63};
64
65} // namespace mysql::sets
66
67// addtogroup GroupLibsMysqlSets
68/// @}
69
70#endif // ifndef MYSQL_SETS_INTERVAL_CONST_VIEWS_H
Experimental API header.
Experimental API header.
const auto & boundaries() const
Definition: interval_const_views.h:47
Forward declaration of primary template for views over empty sets.
Definition: base_const_views.h:46
const auto & boundaries() const
Definition: interval_const_views.h:60
Forward declaration of primary template for views over "full" sets, i.e., the complement of the empty...
Definition: base_const_views.h:72
CRTP base class used to define an Interval set based on an implementation having the member function ...
Definition: interval_set_interface.h:87
Experimental API header.
Experimental API header.
Definition: gtid_set.h:183
Tag to identify a class as an Interval set.
Definition: interval_set_category.h:41