Name Date Size

..11-Feb-20204 KiB

.clang-formatH A D11-Feb-2020241

.gitignoreH A D11-Feb-20202 KiB

cmake/H11-Feb-20204 KiB

CMakeLists.txtH A D11-Feb-202015.9 KiB

configure.plH A D11-Feb-20208.4 KiB

contrib/H11-Feb-20204 KiB

CONTRIBUTING.mdH A D11-Feb-20204.7 KiB

doc/H11-Feb-20204 KiB

example/H11-Feb-20204 KiB

gyp_config/H11-Feb-20204 KiB

include/H11-Feb-20204 KiB

libcouchbase.gypH A D11-Feb-20208.3 KiB

LICENSEH A D11-Feb-202011.1 KiB

packaging/H11-Feb-20204 KiB

plugins/io/H11-Feb-20204 KiB

README.markdownH A D11-Feb-20206.7 KiB

RELEASE_NOTES.markdownH A D11-Feb-2020162.4 KiB

src/H11-Feb-20204 KiB

tests/H11-Feb-20204 KiB

tools/H11-Feb-20204 KiB

README.markdown

1# Couchbase C Client
2
3This is the C client library for [Couchbase](http://www.couchbase.com)
4It communicates with the cluster and speaks the relevant protocols
5necessary to connect to the cluster and execute data operations.
6
7## Features
8
9* Can function as either a synchronous or asynchronous library
10* Callback Oriented
11* Can integrate with most other asynchronous environments. You can write your
12  code to integrate it into your environment. Currently support exists for
13    * [libuv](http://github.com/joyent/libuv) (Windows and POSIX)
14    * [libev](http://software.schmorp.de/pkg/libev.html) (POSIX)
15    * [libevent](http://libevent.org/) (POSIX)
16    * `select` (Windows and POSIX)
17    * IOCP (Windows Only)
18* Support for operation batching
19* Cross Platform - Tested on Linux, OS X, and Windows.
20
21## Building
22
23Before you build from this repository, please check the
24[installation page](https://developer.couchbase.com/server/other-products/release-notes-archives/c-sdk)
25to see if there is a binary or release tarball available for your needs. Since the code here is
26not part of an official release it has therefore not gone through our
27release testing process.
28
29### Dependencies
30
31By default the library depends on:
32
33* _libevent_ (or _libev_) for the primary I/O backend.
34* _openssl_ for SSL transport.
35* _CMake_ version 2.8.9 or greater (for building)
36
37On Unix-like systems these dependencies are checked for by default
38while on Windows they are not checked by default.
39
40On Unix, the build system will expect to have _libevent_ or _libev_ installed,
41unless building plugins is explicitly disabled (see further).
42
43### Building on Unix-like systems
44
45Provided is a convenience script called `cmake/configure`. It is a Perl
46script and functions like a normal `autotools` script.
47
48```shell
49$ git clone git://github.com/couchbase/libcouchbase.git
50$ cd libcouchbase && mkdir build && cd build
51$ ../cmake/configure
52$ make
53$ ctest
54```
55
56### Building on Windows
57
58Assuming `git` and Visual Studio 2010 are installed, from a `CMD` shell, do:
59
60```
61C:\> git clone git://github.com/couchbase/libcouchbase.git
62C:\> mkdir lcb-build
63C:\> cd lcb-build
64C:\> cmake -G "Visual Studio 10" ..\libcouchbase
65C:\> cmake --build .
66```
67
68This will generate and build a Visual Studio `.sln` file.
69
70Windows builds are known to work on Visual Studio versions 2008, 2010 and
712012.
72
73If you wish to link against OpenSSL, you should set the value of
74`OPENSSL_ROOT_DIR` to the location of the installation path, as described
75[here](https://github.com/Kitware/CMake/blob/master/Modules/FindOpenSSL.cmake)
76
77## Running tests
78
79To run tests, you can use either ctest directly or generated build targets.
80For Unix-like:
81
82```shell
83make test
84```
85
86For windows:
87
88```batchfile
89cmake --build . --target alltests
90ctest -C debug
91```
92
93By default tests will use [CouchbaseMock](https://github.com/couchbase/CouchbaseMock) project to simulate the Couchbase
94Cluster. It allows to cover more different failure scenarios, although does not implement all kinds of APIs provided
95by real server.
96
97If you need to test against real server, you have to provide comma-separated configuration in `LCB_TEST_CLUSTER_CONF`
98environment variable. For example, the following command will run tests against local cluster and bucket `default` using
99administrator credentials:
100
101```shell
102export LCB_TEST_CLUSTER_CONF=couchbase://localhost,default,Administrator,password
103make test
104```
105Note that specifying username will automatically switch to RBAC mode, which supported by Couchbase Server 5.0+. For old
106servers the spec will look like `couchbase://localhost,default` or `couchbase://localhost,protected,,secret`.
107
108Also tests expecting `beer-sample` bucket loaded. It comes with the server. Look at "Sample buckets" section of Admin
109Console.
110
111## Bugs, Support, Issues
112You may report issues in the library in our issue tracked at
113<https://issues.couchbase.com>. Sign up for an account and file an issue
114against the _Couchbase C Client Library_ project.
115
116The developers of the library hang out in IRC on `#libcouchbase` on
117irc.freenode.net.
118
119
120## Examples
121
122* The `examples` directory
123* Official client libraries using libcouchbase
124    * [node.js](http://github.com/couchbase/couchnode)
125    * [Python](http://github.com/couchbase/couchbase-python-client)
126    * [PHP](http://github.com/couchbase/php-couchbase)
127* Community projects using libcouchbase
128    * [C++11 wrapper](https://github.com/couchbaselabs/libcouchbase-cxx)
129    * [cberl - Couchbase NIF](https://github.com/wcummings/cberl)
130    * [Perl client](https://github.com/mnunberg/perl-Couchbase-Client)
131    * [Ruby](http://github.com/couchbase/couchbase-ruby-client) (uses the old < 2.6 API)
132
133## Documentation
134
135Documentation is available in guide format (introducing the basic concepts of
136Couchbase and the library). It is recommended for first-time users, and can
137be accessed at our [Documentation Site](https://developer.couchbase.com/documentation/server/current/sdk/c/start-using-sdk.html).
138
139API documentation is also available and is generated from the library's headers.
140It may contain references to more advanced features not found in the guide.
141
142API documentation may be generated by running `doxygen` within the source root
143directory. When this is done, you should have a `doc/html/index.html` page which
144may be viewed.
145
146Doxygen may be downloaded from the
147[doxygen downloads page](http://www.stack.nl/~dimitri/doxygen/download.html). Note
148however that most Linux distributions as well as Homebrew contain Doxygen in their
149repositories.
150
151```
152$ doxygen
153$ xdg-open doc/html/index.html # Linux
154$ open doc/html/index.html # OS X
155```
156
157You may also generate documentation using the `doc/Makefile` which dynamically
158inserts version information
159
160```
161$ make -f doc/Makefile public # for public documentation
162$ make -f doc/Makefile internal # for internal documentation
163```
164
165The generated documentation will be in the `doc/public/html` directory for
166public documentation, and in the `doc/internal/html` directory for internal
167documentation.
168
169## Contributors
170
171The following people contributed to libcouchbase (in alphabetic order)
172(last updated Nov. 27 2014)
173
174* Brett Lawson <brett19@gmail.com>
175* Dave Rigby <daver@couchbase.com>
176* Jan Lehnardt <jan@apache.org>
177* Mark Nunberg <mnunberg@haskalah.org>
178* Matt Ingenthron <ingenthr@cep.net>
179* Patrick Varley <patrick@couchbase.com>
180* Paul Farag <pfarag@neuraliq.com>
181* Pierre Joye <pierre.php@gmail.com>
182* Sebastian <sebastian@chango.com>
183* Sergey Avseyev <sergey.avseyev@gmail.com>
184* Subhashni Balakrishnan <b.subhashni@gmail.com>
185* Sundar Sridharan <sundar.sridharan@gmail.com>
186* Trond Norbye <trond.norbye@gmail.com>
187* Volker Mische <vmx@couchbase.com>
188* William Bowers <wbowers@neuraliq.com>
189* Yura Sokolov <funny.falcon@gmail.com>
190* Yury Alioshinov <haster2010@gmail.com>
191
192## License
193
194libcouchbase is licensed under the Apache 2.0 License. See `LICENSE` file for
195details.
196