Cppinecone
A C++ client for the Pinecone vector database
index_operations.hpp
Go to the documentation of this file.
1 #pragma once
7 #include <string>
8 #include <vector>
9 
15 
16 namespace pinecone::domain
17 {
18 template <>
19 struct operation_args<operation_type::index_list>
20  : public list_operation_args<operation_type::index_list>,
21  public types::parser<std::vector<std::string>> {
22  using list_operation_args::list_operation_args;
23 };
24 
25 template <>
26 struct operation_args<operation_type::index_describe>
27  : public describe_delete_operation_args<operation_type::index_describe>,
28  public types::parser<types::database> {
29  using describe_delete_operation_args::describe_delete_operation_args;
30 };
31 
32 template <>
33 struct operation_args<operation_type::index_delete>
34  : public describe_delete_operation_args<operation_type::index_delete>,
35  public types::parser<types::accepted> {
36  using describe_delete_operation_args::describe_delete_operation_args;
37 };
38 
39 template <>
40 struct operation_args<operation_type::collection_list>
41  : public list_operation_args<operation_type::collection_list>,
42  public types::parser<std::vector<std::string>> {
43  using list_operation_args::list_operation_args;
44 };
45 
46 template <>
47 struct operation_args<operation_type::collection_describe>
48  : public describe_delete_operation_args<operation_type::collection_describe>,
49  public types::parser<types::collection> {
50  using describe_delete_operation_args::describe_delete_operation_args;
51 };
52 
53 template <>
54 struct operation_args<operation_type::collection_delete>
55  : public describe_delete_operation_args<operation_type::collection_delete>,
56  public types::parser<types::accepted> {
57  using describe_delete_operation_args::describe_delete_operation_args;
58 };
59 
60 template <>
61 struct operation_args<operation_type::index_configure>
62  : public patch_operation_args<operation_type::index_configure, types::index_configuration>,
63  public types::parser<types::accepted> {
64  using patch_operation_args::patch_operation_args;
65 };
66 
67 template <>
68 struct operation_args<operation_type::collection_create>
69  : public create_operation_args<operation_type::collection_create, types::new_collection>,
70  public types::parser<types::accepted> {
71  using create_operation_args::create_operation_args;
72 };
73 
74 template <>
75 struct operation_args<operation_type::index_create>
76  : public create_operation_args<operation_type::index_create, types::new_index>,
77  public types::parser<types::accepted> {
78  using create_operation_args::create_operation_args;
79 };
80 } // namespace pinecone::domain
A monostate sentinel type for operations that have no associated response.
Native C++ type modeling the results of index operations.
Metaprogamming infrastructure for generation of per-operation code.
Operations made available by the Pinecone API.
operation_type
All operation types exposed by the Pinecone REST API.
Parses HTTP responses to domain types.
Create operations construct themselves using a unique resource name and an operation-dependent body p...
Definition: operation.hpp:120
Describe operations construct themselves using a unique resource name.
Definition: operation.hpp:77
List operations are simple and construct themselves using only a URL.
Definition: operation.hpp:44
Operation-specific arguments.
Definition: operation.hpp:172
Patch operations construct themselves using a unique resource name and an operation-dependent body pa...
Definition: operation.hpp:93
Parses raw data from the Pinecone API into native C++ types.
Definition: parser.hpp:27