Skip to content
Snippets Groups Projects
Verified Commit f292404f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' into f-acm

parents e815b0ba bd3a90c1
Branches
Tags
2 merge requests!42Release 0.2.0,!40F dot in username
...@@ -7,8 +7,8 @@ for CaosDB and a part of the CaosDB project. ...@@ -7,8 +7,8 @@ for CaosDB and a part of the CaosDB project.
## Setup ## Setup
Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to Please read the installation notes [online](https://docs.indiscale.com/caosdb-cpplib/Install_develop.html) or [in the source repository](doc/Install_develop.md) for instructions
develop, build and use this code. on how to build, use and develop this code.
## Further Reading ## Further Reading
...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md). ...@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md).
## License ## License
* Copyright (C) 2021 Indiscale GmbH <info@indiscale.com> * Copyright (C) 2022 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](LICENCE.md) (version 3 or later). License](LICENCE.md) (version 3 or later).
doc/README_SETUP.md
\ No newline at end of file
...@@ -84,7 +84,7 @@ if (DOXYGEN_FOUND) ...@@ -84,7 +84,7 @@ if (DOXYGEN_FOUND)
sphinx_out sphinx_out
DEPENDS doc-doxygen DEPENDS doc-doxygen
Examples.rst Examples.rst
README_SETUP.md Install_develop.md
FEATURES.md FEATURES.md
CHANGELOG.md CHANGELOG.md
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
...@@ -94,7 +94,7 @@ if (DOXYGEN_FOUND) ...@@ -94,7 +94,7 @@ if (DOXYGEN_FOUND)
# Copying files is necessary: https://stackoverflow.com/a/45808534/232888 # Copying files is necessary: https://stackoverflow.com/a/45808534/232888
file(COPY file(COPY
Examples.rst Examples.rst
README_SETUP.md Install_develop.md
DEPENDENCIES.md DEPENDENCIES.md
CHANGELOG.md CHANGELOG.md
FEATURES.md FEATURES.md
......
...@@ -5,8 +5,8 @@ Examples ...@@ -5,8 +5,8 @@ Examples
Connect to a CaosDB server Connect to a CaosDB server
-------------------------- --------------------------
See also the hints on how to :doc:`get started<README_SETUP>`, and set-up of libcaosdb. In order to See also the hints on how to :doc:`get started<Install_develop>`, and set-up of libcaosdb. In order
connect to a CaosDB server with libcaosdb you first have to configure the connection via a to connect to a CaosDB server with libcaosdb 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
...@@ -19,6 +19,7 @@ You can print the full version of the server that you are connected to (and ...@@ -19,6 +19,7 @@ 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:
.. code:: cpp .. code:: cpp
// get version info of the server // get version info of the server
connection.RetrieveVersionInfo() connection.RetrieveVersionInfo()
const auto &v_info = connection->GetVersionInfo(); const auto &v_info = connection->GetVersionInfo();
...@@ -57,8 +58,9 @@ you want to retrieve an Entity with id=123. This is done via ...@@ -57,8 +58,9 @@ you want to retrieve an Entity with id=123. This is done via
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<caosdb::entity::Entity::GetId>`,
:cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or :cpp:any:`GetProperties`<caosdb::entity::Entity::GetProperties>` to get the :cpp:any:`GetParents<caosdb::entity::Entity::GetParents>`, or
name, the parents, or the properties of the retrieved entity. :cpp:any:`GetProperties`<caosdb::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 Retrieving multiple entities works in the same way. Type
...@@ -83,9 +85,9 @@ transaction manually. This is done by ...@@ -83,9 +85,9 @@ transaction manually. This is done by
transaction->RetrieveById("1233"); transaction->RetrieveById("1233");
auto status = transaction->Execute(); auto status = transaction->Execute();
A result set can be obtained A result set can be obtained via
via :cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the resulting entities :cpp:any:`GetResultSet`<caosdb::transaction::Transaction::GetResultSet>` which contains the
and can, e.g., be checked for length. resulting entities and can, e.g., be checked for length.
Execute queries Execute queries
--------------- ---------------
...@@ -147,6 +149,7 @@ Insert, update and delete operations function the same way. The respective ...@@ -147,6 +149,7 @@ Insert, update and delete operations function the same way. The respective
task is added to a transaction and the transaction is executed. 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(); caosdb::connection::ConnectionManager::GetDefaultConnection();
...@@ -202,7 +205,7 @@ task is added to a transaction and the transaction is executed. ...@@ -202,7 +205,7 @@ task is added to a transaction and the transaction is executed.
Up- and Download a file Up- and Download a file
--------------- -----------------------
.. code:: cpp .. code:: cpp
......
# How to Develop and Use Libcaosdb # How to use and develop libcaosdb
## Dependencies ## Dependencies
...@@ -6,6 +6,17 @@ ...@@ -6,6 +6,17 @@
## Build ## Build
### Building with `make` ##
Make sure that the dependencies (see above) are fulfilled. On systems which have `make` installed,
type this in your command line terminal:
```console
make conan
```
### Manual build ##
We use [cmake](https://cmake.org) as build tool, with Conan as package manager. We use [cmake](https://cmake.org) as build tool, with Conan as package manager.
The compiler must support the C++17 standard. The compiler must support the C++17 standard.
...@@ -66,12 +77,6 @@ as compiler. We use [cmake](https://cmake.org/download/) as build tool. ...@@ -66,12 +77,6 @@ as compiler. We use [cmake](https://cmake.org/download/) as build tool.
fix this in the next release. See fix this in the next release. See
[#34](https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib/-/issues/34) [#34](https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib/-/issues/34)
### Creating a local Conan package ##
Building and installing libcaosdb with Conan is just a single command: `make conan`
For MacOS, you probably should adjust the option as mentioned above.
### Troubleshooting ### Troubleshooting
#### `conan install` fails due to missing prebuilts #### `conan install` fails due to missing prebuilts
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = '@CMAKE_PROJECT_NAME@' project = '@CMAKE_PROJECT_NAME@'
copyright = '2021 IndiScale GmbH' copyright = '2022 IndiScale GmbH'
author = 'Timm Fitschen' author = 'Timm Fitschen'
version = '@CMAKE_PROJECT_VERSION@' version = '@CMAKE_PROJECT_VERSION@'
release = '@CMAKE_PROJECT_VERSION@' release = '@CMAKE_PROJECT_VERSION@'
...@@ -46,7 +46,7 @@ extensions = [ ...@@ -46,7 +46,7 @@ extensions = [
'sphinx_sitemap', 'sphinx_sitemap',
'sphinx.ext.inheritance_diagram', 'sphinx.ext.inheritance_diagram',
'breathe', 'breathe',
"recommonmark" # For markdown files. "recommonmark", # For markdown files.
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
......
...@@ -30,7 +30,7 @@ Welcome to |PROJECT_NAME|'s documentation! ...@@ -30,7 +30,7 @@ Welcome to |PROJECT_NAME|'s documentation!
:caption: Contents: :caption: Contents:
Welcome <self> Welcome <self>
Getting Started <README_SETUP> Getting Started <Install_develop>
Examples.rst Examples.rst
cppapi/index cppapi/index
capi/index capi/index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment