Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
Types.hpp
1#pragma once
2
3#include <cstdint>
4#include <expected>
5#include <string>
6#include <utility>
7
8namespace data::cassandra {
9namespace impl {
10
11struct Settings;
12class Session;
13class Cluster;
14struct Future;
16struct Result;
17class Statement;
19struct Batch;
20
21} // namespace impl
22
30
38struct Limit {
39 int32_t limit;
40};
41
49struct Text {
50 std::string text;
51
57 explicit Text(std::string text) : text{std::move(text)}
58 {
59 }
60};
61
62class Handle;
63class CassandraError;
64
65using MaybeError = std::expected<void, CassandraError>;
66using ResultOrError = std::expected<Result, CassandraError>;
67using Error = std::unexpected<CassandraError>;
68
69} // namespace data::cassandra
Definition Cluster.hpp:157
Represents a prepared statement on the DB side.
Definition Statement.hpp:158
Definition Session.hpp:9
Definition Statement.hpp:28
This namespace implements a wrapper for the Cassandra C++ driver.
Definition CassandraBackendFamily.hpp:50
std::expected< void, CassandraError > MaybeError
Success or a database error.
Definition Types.hpp:65
impl::Future Future
Future of an asynchronous query.
Definition Types.hpp:24
std::unexpected< CassandraError > Error
A database error.
Definition Types.hpp:67
impl::Statement Statement
A simple or bound statement.
Definition Types.hpp:27
impl::PreparedStatement PreparedStatement
A prepared statement.
Definition Types.hpp:28
std::expected< Result, CassandraError > ResultOrError
A query result or an error.
Definition Types.hpp:66
impl::Settings Settings
All Cassandra backend settings.
Definition Types.hpp:23
impl::Result Result
Result of a query.
Definition Types.hpp:26
impl::Batch Batch
A batch of statements.
Definition Types.hpp:29
impl::FutureWithCallback FutureWithCallback
Future that invokes a callback.
Definition Types.hpp:25
A strong type wrapper for int32_t.
Definition Types.hpp:38
int32_t limit
The LIMIT value to bind.
Definition Types.hpp:39
std::string text
The string to bind as TEXT.
Definition Types.hpp:50
Text(std::string text)
Construct a new Text object from string type.
Definition Types.hpp:57
Definition Batch.hpp:12
Definition Future.hpp:13
Definition Result.hpp:101
Bundles all cassandra settings in one place.
Definition Cluster.hpp:37