diff --git a/README.md b/README.md index 79aa60339d432624ca7a8e65145975e6365e23ad..acad02fd82c543b9f2f97d7fc9fa1e7665282ea5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# libcaosdb +# liblinkahead ## Welcome -This is the development repository of **caosdb-cpplib** - a C++ client library -for CaosDB and a part of the CaosDB project. +This is the development repository of **linkahead-cpplib** - a C++ client library +for LinkAhead and a part of the LinkAhead project. ## Setup @@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md). ## 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 License](LICENSE.md) (version 3 or later). diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md index 8260a985b5146a0a8332ce1b8213eec6b3d0d325..1859b90acefbd889ee4b5774898d01cc08c67272 100644 --- a/RELEASE_GUIDELINES.md +++ b/RELEASE_GUIDELINES.md @@ -1,7 +1,7 @@ -# 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 -guidelines of the CaosDB Project +guidelines of the LinkAhead Project ([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md)) ## General Prerequisites diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 3f5ccde73fd4f7dad16b2f47abd767f504567b41..79f4865caa1a668cb48eb3905cafa964244e3811 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Renamed the project to linkahead-cpplib - Updated dependency versions. - Updated Python dependencies for Conan 2 and support Python 3.12. - Updated C++ package manager Conan to 2.5.0. diff --git a/doc/DEPENDENCIES.md b/doc/DEPENDENCIES.md index eb31b5cef190c48300f1166630b920228ad23202..dbbd559904ce9314891a8d5dcf1d332929136474 100644 --- a/doc/DEPENDENCIES.md +++ b/doc/DEPENDENCIES.md @@ -11,7 +11,7 @@ Exact versions of some packages here are listed in `requirements.txt`. ## Compiling ## ``` ->=conan-1.54.0 (e.g. with `pip install conan`) +>=conan-2.5.0 (e.g. with `pip install conan`) >=cmake-3.13 >=gcc-10.2.0 | >=clang-11 ``` diff --git a/doc/Examples.rst b/doc/Examples.rst index 1bf62f31a05bccd9e168be22a1c2d12d6873f325..32c52b032062a2cb7d5a8e85df94412d8ab5039b 100644 --- a/doc/Examples.rst +++ b/doc/Examples.rst @@ -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 -to connect to a CaosDB server with libcaosdb you first have to configure the connection via a +See also the hints on how to :doc:`get started<Install_develop>`, and set-up of liblinkahead. In order +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>`. Once the configuration is set up, connecting to the server is as easy as .. code:: cpp 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 therby test the connection) via: @@ -32,19 +32,19 @@ therby test the connection) via: 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 result(s) . This 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 -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 want to retrieve an Entity with id=123. This is done via .. code:: cpp const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); auto transaction(connection->CreateTransaction()); @@ -57,9 +57,9 @@ you want to retrieve an Entity with id=123. This is done via const auto &entity = result_set.at(0) -You can then use the getter methods like :cpp:any:`GetId<caosdb::entity::Entity::GetId>`, -:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or -:cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the name, the parents, or +You can then use the getter methods like :cpp:any:`GetId<linkahead::entity::Entity::GetId>`, +:cpp:any:`GetParents<linkahead::entity::Entity::GetParents>`, or +:cpp:any:`GetProperties`<linkahead::entity::Entity::GetProperties>` to get the name, the parents, or the properties of the retrieved entity. Retrieving multiple entities works in the same way. Type @@ -78,7 +78,7 @@ transaction manually. This is done by .. code:: cpp const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); auto transaction(connection->CreateTransaction()); transaction->RetrieveById("1231"); @@ -86,7 +86,7 @@ transaction manually. This is done by auto status = transaction->Execute(); 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. Execute queries @@ -98,12 +98,12 @@ ids. 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 const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); auto query_transaction(connection->CreateTransaction()); query_transaction->Query("FIND ENTITY WITH id = 1222"); @@ -119,7 +119,7 @@ inspected as above. :: 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. COUNT queries @@ -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, secondly, they do not have a result set that could be returned. 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 const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); auto query_transaction(connection->CreateTransaction()); 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. .. code:: cpp const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); // ######## INSERT ######## @@ -210,7 +210,7 @@ Up- and Download a file .. code:: cpp const auto &connection = - caosdb::connection::ConnectionManager::GetDefaultConnection(); + linkahead::connection::ConnectionManager::GetDefaultConnection(); Entity file; file.SetRole(Role::FILE); diff --git a/doc/FEATURES.md b/doc/FEATURES.md index 770574833a4fd9dcfd777f9aae4d1f2060ddf541..905481bd4771929ae6c333fa9a5c4d2d8d267dda 100644 --- a/doc/FEATURES.md +++ b/doc/FEATURES.md @@ -1,7 +1,7 @@ # Features -This library provides a client for communication with a CaosDB server over the -CaosDB GRPC-APIs. The client supports +This library provides a client for communication with a LinkAhead server over the +LinkAhead GRPC-APIs. The client supports * Transaction of entities and file transmission. * Authentication via Username/Password. @@ -11,18 +11,18 @@ CaosDB GRPC-APIs. The client supports * File-based configuration. 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 --- 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. Minimal testing executables in C++ and C are included as well, but they only 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. Current limitations: The implementation does not support mixing retrievals with @@ -32,12 +32,12 @@ write-transactions. 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. -## CaosDB ACM (Access Control Management) API +## LinkAhead ACM (Access Control Management) API This library implements small parts of the experimental ACM API (caosdb.acm.v1alpha1) as a client. @@ -46,7 +46,7 @@ This library implements small parts of the experimental ACM API 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 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 diff --git a/doc/Install_develop.rst b/doc/Install_develop.rst index 56908a7994e291956ad08fbfdf4c89ccd417e29b..58f799356ea3d2b085db3ab1a731d7a15d43cc9f 100644 --- a/doc/Install_develop.rst +++ b/doc/Install_develop.rst @@ -1,4 +1,4 @@ -How to use and develop libcaosdb +How to use and develop liblinkahead ================================ Dependencies @@ -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`` 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 1. ``cmake --install .`` @@ -42,13 +42,13 @@ command (4.). .. 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 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 -free to rewrite the CMakeLists.txt as needed. The CaosDB project is open +If you want to build or install liblinkahead without the use of Conan, feel +free to rewrite the CMakeLists.txt as needed. The LinkAhead project is open to merge requests which support multiple ways of installation. Optional: Building with ``vcpkg`` @@ -113,10 +113,10 @@ tool. 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`` 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 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\``. Known problems diff --git a/doc/capi/index.rst.in b/doc/capi/index.rst.in index 67697d6081b1a263c83a94519dbb1f57251be2d3..1848f93bcd9e3b57844bab8e84347a828f6d8c18 100644 --- a/doc/capi/index.rst.in +++ b/doc/capi/index.rst.in @@ -32,12 +32,12 @@ .. 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 - 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 deleted manually. diff --git a/doc/header_file.rst.in b/doc/header_file.rst.in index a00bc2013b06b0f75817b547dfc55ba6525efaf3..16e455bdf07e88505a2ad4910a073f09d875ab2e 100644 --- a/doc/header_file.rst.in +++ b/doc/header_file.rst.in @@ -29,4 +29,4 @@ :hidden: .. doxygenfile:: @HEADER_FILE@ - :project: libcaosdb + :project: liblinkahead