Skip to content
Snippets Groups Projects
Commit 206ecec3 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Rename docs

parent 408c8b83
No related branches found
No related tags found
2 merge requests!61Release 0.3.0,!55Rename caosdb-cpplib to linkahead-cpplib
# libcaosdb # liblinkahead
## Welcome ## Welcome
This is the development repository of **caosdb-cpplib** - a C++ client library This is the development repository of **linkahead-cpplib** - a C++ client library
for CaosDB and a part of the CaosDB project. for LinkAhead and a part of the LinkAhead project.
## Setup ## Setup
...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md). ...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md).
## License ## License
* Copyright (C) 2022 Indiscale GmbH <info@indiscale.com> * Copyright (C) 2022-2024 Indiscale GmbH <info@indiscale.com>
All files in this repository are licensed under a [GNU Affero General Public All files in this repository are licensed under a [GNU Affero General Public
License](LICENSE.md) (version 3 or later). License](LICENSE.md) (version 3 or later).
# Release Guidelines for the CaosDB Python Client Library # Release Guidelines for the LinkAhead C++ Client Library
This document specifies release guidelines in addition to the generel release This document specifies release guidelines in addition to the generel release
guidelines of the CaosDB Project guidelines of the LinkAhead Project
([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md)) ([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md))
## General Prerequisites ## General Prerequisites
......
...@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Renamed the project to linkahead-cpplib
- Updated dependency versions. - Updated dependency versions.
- Updated Python dependencies for Conan 2 and support Python 3.12. - Updated Python dependencies for Conan 2 and support Python 3.12.
- Updated C++ package manager Conan to 2.5.0. - Updated C++ package manager Conan to 2.5.0.
......
...@@ -11,7 +11,7 @@ Exact versions of some packages here are listed in `requirements.txt`. ...@@ -11,7 +11,7 @@ Exact versions of some packages here are listed in `requirements.txt`.
## Compiling ## ## Compiling ##
``` ```
>=conan-1.54.0 (e.g. with `pip install conan`) >=conan-2.5.0 (e.g. with `pip install conan`)
>=cmake-3.13 >=cmake-3.13
>=gcc-10.2.0 | >=clang-11 >=gcc-10.2.0 | >=clang-11
``` ```
......
...@@ -2,18 +2,18 @@ Examples ...@@ -2,18 +2,18 @@ Examples
======== ========
Connect to a CaosDB server Connect to a LinkAhead server
-------------------------- --------------------------
See also the hints on how to :doc:`get started<Install_develop>`, and set-up of libcaosdb. In order See also the hints on how to :doc:`get started<Install_develop>`, and set-up of liblinkahead. In order
to connect to a CaosDB server with libcaosdb you first have to configure the connection via a to connect to a LinkAhead server with liblinkahead you first have to configure the connection via a
configuration file as explained in the :ref:`"Client Configuration" section <Client configuration file as explained in the :ref:`"Client Configuration" section <Client
Configuration>`. Once the configuration is set up, connecting to the server is as easy as Configuration>`. Once the configuration is set up, connecting to the server is as easy as
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
You can print the full version of the server that you are connected to (and You can print the full version of the server that you are connected to (and
therby test the connection) via: therby test the connection) via:
...@@ -32,19 +32,19 @@ therby test the connection) via: ...@@ -32,19 +32,19 @@ therby test the connection) via:
Retrieve a Record Retrieve a Record
----------------- -----------------
With libcaosdb you can create a transaction With liblinkahead you can create a transaction
object, fill it with sub-requests, execute it, and retrieve the object, fill it with sub-requests, execute it, and retrieve the
result(s) . This result(s) . This
is handy when you want to have several requests in the same transaction. is handy when you want to have several requests in the same transaction.
However, most of the time, e.g., when retrieving one or multiple However, most of the time, e.g., when retrieving one or multiple
Records, this is not necessary. libcaosdb provides helper functions so Records, this is not necessary. liblinkahead provides helper functions so
you don’t have to worry about transactions and their executions. Assume you don’t have to worry about transactions and their executions. Assume
you want to retrieve an Entity with id=123. This is done via you want to retrieve an Entity with id=123. This is done via
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto transaction(connection->CreateTransaction()); auto transaction(connection->CreateTransaction());
...@@ -57,9 +57,9 @@ you want to retrieve an Entity with id=123. This is done via ...@@ -57,9 +57,9 @@ you want to retrieve an Entity with id=123. This is done via
const auto &entity = result_set.at(0) const auto &entity = result_set.at(0)
You can then use the getter methods like :cpp:any:`GetId<caosdb::entity::Entity::GetId>`, You can then use the getter methods like :cpp:any:`GetId<linkahead::entity::Entity::GetId>`,
:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or :cpp:any:`GetParents<linkahead::entity::Entity::GetParents>`, or
:cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the name, the parents, or :cpp:any:`GetProperties`<linkahead::entity::Entity::GetProperties>` to get the name, the parents, or
the properties of the retrieved entity. the properties of the retrieved entity.
Retrieving multiple entities works in the same way. Type Retrieving multiple entities works in the same way. Type
...@@ -78,7 +78,7 @@ transaction manually. This is done by ...@@ -78,7 +78,7 @@ transaction manually. This is done by
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto transaction(connection->CreateTransaction()); auto transaction(connection->CreateTransaction());
transaction->RetrieveById("1231"); transaction->RetrieveById("1231");
...@@ -86,7 +86,7 @@ transaction manually. This is done by ...@@ -86,7 +86,7 @@ transaction manually. This is done by
auto status = transaction->Execute(); auto status = transaction->Execute();
A result set can be obtained via A result set can be obtained via
:cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the :cpp:any:`GetResultSet`<linkahead::transaction::Transaction::GetResultSet>` which contains the
resulting entities and can, e.g., be checked for length. resulting entities and can, e.g., be checked for length.
Execute queries Execute queries
...@@ -98,12 +98,12 @@ ids. ...@@ -98,12 +98,12 @@ ids.
FIND and SELECT queries FIND and SELECT queries
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
In general, entities can be found using CaosDB’s query language like In general, entities can be found using LinkAhead’s query language like
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto query_transaction(connection->CreateTransaction()); auto query_transaction(connection->CreateTransaction());
query_transaction->Query("FIND ENTITY WITH id = 1222"); query_transaction->Query("FIND ENTITY WITH id = 1222");
...@@ -119,7 +119,7 @@ inspected as above. ...@@ -119,7 +119,7 @@ inspected as above.
:: ::
SELECT queries haven't been implemented in the C++ client yet and SELECT queries haven't been implemented in the C++ client yet and
thus cannot be executed from libcaosdb right now. SELECT queries thus cannot be executed from liblinkahead right now. SELECT queries
will be added in a future release. will be added in a future release.
COUNT queries COUNT queries
...@@ -129,12 +129,12 @@ COUNT queries are different from FIND or SELECT queries in two ways. ...@@ -129,12 +129,12 @@ COUNT queries are different from FIND or SELECT queries in two ways.
Firstly, they do not return entities but a single number which is why, Firstly, they do not return entities but a single number which is why,
secondly, they do not have a result set that could be returned. secondly, they do not have a result set that could be returned.
The result of the count is The result of the count is
obtained using the :cpp:any:`GetCountResult<caosdb::transaction::Transaction::GetCountResult>` function: obtained using the :cpp:any:`GetCountResult<linkahead::transaction::Transaction::GetCountResult>` function:
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
auto query_transaction(connection->CreateTransaction()); auto query_transaction(connection->CreateTransaction());
query_transaction->Query("COUNT RECORD person WITH NAME LIKE '*Baggins'"); query_transaction->Query("COUNT RECORD person WITH NAME LIKE '*Baggins'");
...@@ -151,7 +151,7 @@ task is added to a transaction and the transaction is executed. ...@@ -151,7 +151,7 @@ task is added to a transaction and the transaction is executed.
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
// ######## INSERT ######## // ######## INSERT ########
...@@ -210,7 +210,7 @@ Up- and Download a file ...@@ -210,7 +210,7 @@ Up- and Download a file
.. code:: cpp .. code:: cpp
const auto &connection = const auto &connection =
caosdb::connection::ConnectionManager::GetDefaultConnection(); linkahead::connection::ConnectionManager::GetDefaultConnection();
Entity file; Entity file;
file.SetRole(Role::FILE); file.SetRole(Role::FILE);
......
# Features # Features
This library provides a client for communication with a CaosDB server over the This library provides a client for communication with a LinkAhead server over the
CaosDB GRPC-APIs. The client supports LinkAhead GRPC-APIs. The client supports
* Transaction of entities and file transmission. * Transaction of entities and file transmission.
* Authentication via Username/Password. * Authentication via Username/Password.
...@@ -11,18 +11,18 @@ CaosDB GRPC-APIs. The client supports ...@@ -11,18 +11,18 @@ CaosDB GRPC-APIs. The client supports
* File-based configuration. * File-based configuration.
The core is written in C++ and makes heavy use of object-oriented patterns. It The core is written in C++ and makes heavy use of object-oriented patterns. It
results in a c++ library -- libcaosdb. results in a c++ library -- liblinkahead.
For using the library in a plain C context, a thin wrapper is included For using the library in a plain C context, a thin wrapper is included
-- libccaosdb. It wrapps the C++ classes into structs and the member methods -- libclinkahead. It wrapps the C++ classes into structs and the member methods
into functions which operate on the wrapped C++ instances. into functions which operate on the wrapped C++ instances.
Minimal testing executables in C++ and C are included as well, but they only Minimal testing executables in C++ and C are included as well, but they only
serve as just that -- minimal testing. serve as just that -- minimal testing.
## CaosDB Entitiy API ## LinkAhead Entitiy API
This library implements a subset of the CaosDB Entitiy API (caosdb.entity.v1) This library implements a subset of the LinkAhead Entitiy API (caosdb.entity.v1)
as a client. as a client.
Current limitations: The implementation does not support mixing retrievals with Current limitations: The implementation does not support mixing retrievals with
...@@ -32,12 +32,12 @@ write-transactions. ...@@ -32,12 +32,12 @@ write-transactions.
Support for `FIND`, `SELECT` and `COUNT` queries. Support for `FIND`, `SELECT` and `COUNT` queries.
## CaosDB Info API ## LinkAhead Info API
This library implements the CaosDB Info API (caosdb.info.v1) as a client This library implements the LinkAhead Info API (caosdb.info.v1) as a client
without limitations. without limitations.
## CaosDB ACM (Access Control Management) API ## LinkAhead ACM (Access Control Management) API
This library implements small parts of the experimental ACM API This library implements small parts of the experimental ACM API
(caosdb.acm.v1alpha1) as a client. (caosdb.acm.v1alpha1) as a client.
...@@ -46,7 +46,7 @@ This library implements small parts of the experimental ACM API ...@@ -46,7 +46,7 @@ This library implements small parts of the experimental ACM API
Currently, the library should not be considered thread-safe. Currently, the library should not be considered thread-safe.
The `caosdb::transaction::Transaction` class is designed with an with an The `linkahead::transaction::Transaction` class is designed with an with an
interface ready for concurrent and asyncronous transactions. While it is interface ready for concurrent and asyncronous transactions. While it is
possible to execute transactions in non-blocking mode and call `GetStatus` possible to execute transactions in non-blocking mode and call `GetStatus`
concurrently, it is not possible to use any of the non-const methods of the concurrently, it is not possible to use any of the non-const methods of the
......
How to use and develop libcaosdb How to use and develop liblinkahead
================================ ================================
Dependencies Dependencies
...@@ -31,7 +31,7 @@ package manager. The compiler must support the C++17 standard. ...@@ -31,7 +31,7 @@ package manager. The compiler must support the C++17 standard.
4. ``cmake -S ../.. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release`` 4. ``cmake -S ../.. -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release``
5. ``cmake --build .`` 5. ``cmake --build .``
You may also want to install libcaosdb system-wide to You may also want to install liblinkahead system-wide to
``CMAKE_INSTALL_PREFIX/lib`` by ``CMAKE_INSTALL_PREFIX/lib`` by
1. ``cmake --install .`` 1. ``cmake --install .``
...@@ -42,13 +42,13 @@ command (4.). ...@@ -42,13 +42,13 @@ command (4.).
.. Note:: .. Note::
The C++ CaosDB library links against other libraries which are installed by Conan. So if you want The C++ LinkAhead library links against other libraries which are installed by Conan. So if you want
to switch to newer versions of those libraries (possible reasons may be security releases or bug to switch to newer versions of those libraries (possible reasons may be security releases or bug
fixes), it is not sufficient to update your system libraries, but you have to update your Conan fixes), it is not sufficient to update your system libraries, but you have to update your Conan
content and then rebuild libcaosdb. content and then rebuild liblinkahead.
If you want to build or install libcaosdb without the use of Conan, feel If you want to build or install liblinkahead without the use of Conan, feel
free to rewrite the CMakeLists.txt as needed. The CaosDB project is open free to rewrite the CMakeLists.txt as needed. The LinkAhead project is open
to merge requests which support multiple ways of installation. to merge requests which support multiple ways of installation.
Optional: Building with ``vcpkg`` Optional: Building with ``vcpkg``
...@@ -113,10 +113,10 @@ tool. ...@@ -113,10 +113,10 @@ tool.
1. Install Python and create a virtual environment with the dependencies in `requirements.txt`. 1. Install Python and create a virtual environment with the dependencies in `requirements.txt`.
2. Activate the environment run in the repository folder: ``conan install . --build=missing -s build_type=Release`` 2. Activate the environment run in the repository folder: ``conan install . --build=missing -s build_type=Release``
3. ``cmake --preset conan-default`` 3. ``cmake --preset conan-default``
4. Open ``build/libcaosdb.sln`` with Visual Studio, change the 4. Open ``build/liblinkahead.sln`` with Visual Studio, change the
buildtype to ``Release`` and build the project (ALL_BUILD). (You buildtype to ``Release`` and build the project (ALL_BUILD). (You
can open Tools/Command Line/Developer Command Prompt and execute can open Tools/Command Line/Developer Command Prompt and execute
``msbuild libcaosdb.sln /property:Configuration=Release``) ``msbuild liblinkahead.sln /property:Configuration=Release``)
5. Try running the cli clients in ``.\build\Release\``. 5. Try running the cli clients in ``.\build\Release\``.
Known problems Known problems
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
.. note:: .. note::
When working with libcaosdb's C API keep the following in mind: When working with liblinkahead's C API keep the following in mind:
Delete all objects (transactions, entities, properties, parents, ...) that you created using a Delete all objects (transactions, entities, properties, parents, ...) that you created using a
call to ``caosdb_..._create_...`` or released using ``caosdb_..._release_...`` and only those. call to ``linkahead_..._create_...`` or released using ``linkahead_..._release_...`` and only those.
Specifically, any objects set by a ``caosdb_..._get_...`` function are managed by another owning Specifically, any objects set by a ``linkahead_..._get_...`` function are managed by another owning
object (e.g., a connection object is managed by the connection manager) and thus should not be object (e.g., a connection object is managed by the connection manager) and thus should not be
deleted manually. deleted manually.
......
...@@ -29,4 +29,4 @@ ...@@ -29,4 +29,4 @@
:hidden: :hidden:
.. doxygenfile:: @HEADER_FILE@ .. doxygenfile:: @HEADER_FILE@
:project: libcaosdb :project: liblinkahead
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment