Cppinecone
A C++ client for the Pinecone vector database
operation.hpp File Reference

Metaprogamming infrastructure for generation of per-operation code. More...

#include <sstream>
#include <string>
#include <variant>
#include <curl/curl.h>
#include <curl/easy.h>
#include "pinecone/domain/method.hpp"
#include "pinecone/domain/operation_type.hpp"
#include "pinecone/net/url_builder.hpp"
#include "pinecone/util/curl_result.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pinecone::domain::arg_base
 All operations require a common subset of information; this information forms the base arguments. More...
 
struct  pinecone::domain::list_operation_args< op >
 List operations are simple and construct themselves using only a URL. More...
 
struct  pinecone::domain::describe_delete_operation_args< op >
 Describe operations construct themselves using a unique resource name. More...
 
struct  pinecone::domain::patch_operation_args< op, Body >
 Patch operations construct themselves using a unique resource name and an operation-dependent body payload. More...
 
struct  pinecone::domain::create_operation_args< op, Body >
 Create operations construct themselves using a unique resource name and an operation-dependent body payload. More...
 
struct  pinecone::domain::vector_operation_args< op, Body >
 Vector operations construct themselves using a unique resource name and an operation-dependent body payload. More...
 
struct  pinecone::domain::operation< Op, Dep >
 Data common to all Pinecone API operation types. More...
 

Functions

template<operation_type op>
auto pinecone::domain::build_url (net::url_builder const &url_builder, std::string_view resource_name) noexcept -> std::string
 Constructs a URL for an operation that represents a unary resource. More...
 

Detailed Description

Metaprogamming infrastructure for generation of per-operation code.

Definition in file operation.hpp.

Function Documentation

◆ build_url()

template<operation_type op>
auto pinecone::domain::build_url ( net::url_builder const &  url_builder,
std::string_view  resource_name 
) -> std::string
inlinenoexcept

Constructs a URL for an operation that represents a unary resource.

Template Parameters
opthe operation
Parameters
url_buildera url_builder instance
resource_namethe name of the resource that op will run on
Returns
the URL identifying the resource

Definition at line 60 of file operation.hpp.

Referenced by pinecone::domain::build_url().