Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.0.2 #1

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ project(couchbase_cxx_client_demo CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(cmake/CPM.cmake)
find_package(fmt REQUIRED)
find_package(couchbase_cxx_client)

cpmaddpackage(
NAME
couchbase_cxx_client
GIT_TAG
1.0.1
VERSION
1.0.1
GITHUB_REPOSITORY
"couchbase/couchbase-cxx-client"
OPTIONS
"COUCHBASE_CXX_CLIENT_STATIC_BORINGSSL ON")
if (couchbase_cxx_client_FOUND)
find_package(taocpp-json REQUIRED)
else()
set(LATEST_COUCHBASE_CXX_CLIENT 1.0.4)

include(cmake/CPM.cmake)

cpmaddpackage(
NAME
couchbase_cxx_client
GIT_TAG
${LATEST_COUCHBASE_CXX_CLIENT}
VERSION
${LATEST_COUCHBASE_CXX_CLIENT}
GITHUB_REPOSITORY
"couchbase/couchbase-cxx-client"
OPTIONS
"COUCHBASE_CXX_CLIENT_STATIC_BORINGSSL ON")
endif()

add_subdirectory(examples)
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Demo applications for Couchbase C++ SDK. More info at https://github.com/couchbase/couchbase-cxx-client.

```bash
mkdir -p build
cmake -S . -B build
cmake --build build
```
8 changes: 8 additions & 0 deletions examples/ledger_with_csv_encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class byte_appender
{
}

constexpr byte_appender(const byte_appender&) = default;
byte_appender(byte_appender&&) = default;
auto operator=(const byte_appender& other) -> byte_appender&
{
output_ = other.output_;
return *this;
}

auto operator=(char ch) -> byte_appender&
{
output_.push_back(static_cast<std::byte>(ch));
Expand Down
1 change: 1 addition & 0 deletions examples/minimal.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <couchbase/cluster.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/logger.hxx>

#include <tao/json.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/minimal_query.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <couchbase/cluster.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/logger.hxx>

#include <tao/json.hpp>
Expand Down Expand Up @@ -98,7 +99,7 @@ main()
}

std::cout << "--- Iterating as JSON objects:\n";
for (auto row : resp.rows_as_json()) {
for (auto row : resp.rows_as()) {
std::cout << "Airline(id: " << row["airline"]["id"] << ", name: \"" << row["airline"]["name"]
<< "\")\n";
}
Expand Down
1 change: 1 addition & 0 deletions examples/transactions_transfer_basic.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <couchbase/cluster.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/durability_level.hxx>
#include <couchbase/logger.hxx>
#include <couchbase/transactions/attempt_context.hxx>
Expand Down
1 change: 1 addition & 0 deletions examples/transactions_transfer_read_replica.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <couchbase/cluster.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/durability_level.hxx>
#include <couchbase/logger.hxx>
#include <couchbase/transactions/attempt_context.hxx>
Expand Down
Loading