Skip to content

Commit f1d1d25

Browse files
committed
changed repetitive sections and removed unnecessary sections
1 parent 6162476 commit f1d1d25

File tree

1 file changed

+3
-44
lines changed

1 file changed

+3
-44
lines changed

tutorial/markdown/c++/cxx-quickstart.md

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ length: 30 Mins
2424
---
2525

2626
<!-- [abstract] -->
27-
# Quickstart in Couchbase C++
28-
29-
- Learn to build applications in with Couchbase C++ SDK.
30-
- See how you can fetch data from Couchbase using SQL++ queries
31-
- Explore CRUD operations in action with Couchbase
32-
- Learn about Search Indexes and execute search queries in C++
27+
# Quickstart for Couchbase in C++
3328

3429
In this tutorial, you will learn how to connect to a Couchbase Capella cluster to create, read, update, and delete documents, how to write simple parametrized SQL++ queries and how to create, and perform simple and complex text search using Search indexes.
3530

@@ -38,7 +33,6 @@ In this tutorial, you will learn how to connect to a Couchbase Capella cluster t
3833
To run this prebuilt project, you will need:
3934

4035
- [Couchbase Capella](https://www.couchbase.com/products/capella/) cluster or a self managed Couchbase cluster with [travel-sample](https://docs.couchbase.com/python-sdk/current/ref/travel-app-data-model.html) bucket loaded.
41-
- To run this tutorial using a self managed Couchbase cluster, please refer to this [section](##Running-Self-Managed-Couchbase-Cluster).
4236

4337
- [CMake](https://cmake.org/) 3.9 or higher installed
4438
- [C++17](https://en.cppreference.com/w/cpp/17) and a compatible compiler, [clang++](https://clang.llvm.org/) or [g++](https://gcc.gnu.org/)
@@ -115,12 +109,6 @@ At this point, we have installed the dependencies, loaded the travel-sample data
115109
Once you run the executable, your terminal should fill up with the results of the executed statements written in the main function of the `main.cpp` and should look something like this:
116110
![image](./cli_output.png)
117111

118-
### Running Self Managed Couchbase Cluster
119-
120-
If you are running this quickstart with a self managed Couchbase cluster, you need to [load](https://docs.couchbase.com/server/current/manage/manage-settings/install-sample-buckets.html) the travel-sample data bucket in your cluster and generate the credentials for the bucket.
121-
122-
You need to update the connection string and the credentials in the `set_env_vars.sh` file in the source folder and run `source set_env_vars.sh` to set them.
123-
124112

125113
### Running Tests
126114

@@ -136,38 +124,9 @@ For this quickstart, we use one collection, `airline` and `hotels` collection t
136124
You can find the schema for both these collections in the model folder.
137125

138126

139-
## Let Us Review the Code
127+
## Code Review
140128

141-
To begin this tutorial, clone the repo and open it up in the IDE of your choice. Now you can learn about how to create, read, update and delete documents in Couchbase Server.
142-
143-
### Code Layout
144-
145-
```
146-
├── CMakeLists.txt
147-
├── README.md
148-
├── cmake
149-
│   └── CPM.cmake
150-
├── db.cpp
151-
├── db.h
152-
├── hotel_search_index.json
153-
├── images
154-
│   └── cli_output.png
155-
├── include
156-
├── main.cpp
157-
├── model
158-
│   ├── airline.json
159-
│   └── hotel.json
160-
├── operations.cpp
161-
├── operations.h
162-
├── runner.cpp
163-
├── set_env_vars.sh
164-
└── tests
165-
├── CMakeLists.txt
166-
├── test_doc.json
167-
├── test_index.json
168-
├── test_index2.json
169-
└── tests.cpp
170-
```
129+
To begin this tutorial, clone the repo and open it up in the IDE of your choice. Now you can explore about how to interact with Couchbase Server using the C++ SDK.
171130

172131
We have separated out the SDK code and the main function. The `db.h` and `db.cpp` contain the declaration and the implementation of utility functions we will use to parse environment variables and create a connection to the cluster. `operations.h` and `operations.cpp` contain all the functions that perform operations on the db. Both `db.cpp` and `operations.cpp` are combined to make a static library. The tests are similarly separated out in the `tests` folder which utilise the library created earlier. The `main.cpp` is the executable which is also built by linking the library and contains code that demonstrates the usage of the functions we defined earlier to initeract with the db.
173132

0 commit comments

Comments
 (0)