Skip to content

Commit

Permalink
Update to 1.0.4 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej authored Nov 20, 2024
1 parent 815380e commit 7c9afd5
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 14 deletions.
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

0 comments on commit 7c9afd5

Please sign in to comment.