Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
index_config.h
1/*
2 * Copyright (c) 2008-2025, Hazelcast, Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <string>
20
21#include "hazelcast/util/export.h"
22
23#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
24#pragma warning(push)
25#pragma warning(disable : 4251) // for dll export
26#endif
27
28namespace hazelcast {
29namespace client {
30namespace config {
40struct HAZELCAST_API index_config
41{
42 struct HAZELCAST_API bitmap_index_options
43 {
69
70 std::string key;
71 unique_key_transformation transformation;
72
76 static const std::string DEFAULT_KEY;
77
82
88 };
89
91 {
94
97
100 };
101
103 boost::optional<std::string> name;
104
107
109 std::vector<std::string> attributes;
110
111 boost::optional<bitmap_index_options> options;
112
113 static const index_type DEFAULT_TYPE;
114
120 index_config(index_type type = DEFAULT_TYPE);
121
129 template<typename... T>
131 : index_config(t)
132 {
133 add_attributes(std::forward<T>(attrs)...);
134 }
135
136private:
137 template<typename... T>
138 void add_attributes(std::string attribute, T... attrs)
139 {
140 attributes.emplace_back(std::move(attribute));
141 add_attributes(attrs...);
142 }
143
144 void add_attributes();
145};
146} // namespace config
147} // namespace client
148} // namespace hazelcast
149
150#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
151#pragma warning(pop)
152#endif
bitmap_index_options()
Constructs a new bitmap index options instance with all options set to default values.
Definition config.cpp:806
@ OBJECT
Extracted unique key value is interpreted as an object value.
@ RAW
Extracted unique key value is interpreted as a whole integer value of byte, short,...
@ LONG
Extracted unique key value is interpreted as a whole integer value of byte, short,...
static const unique_key_transformation DEFAULT_TRANSFORMATION
The default for \transformation.
static const std::string DEFAULT_KEY
The default for \key.
std::vector< std::string > attributes
Indexed attributes.
boost::optional< std::string > name
Name of the index.
index_config(index_type type=DEFAULT_TYPE)
Creates an index configuration of the given type.
Definition config.cpp:814
index_type type
Type of the index.
index_config(index_type t, T... attrs)
Creates an index configuration of the given type with provided attributes.