diff --git a/CHANGELOG.md b/CHANGELOG.md index b8491233322a32e4f70c694f40613caf9cc10208..b9568d547aba4f056095a5d9cd540a662fbfcfdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Documentation ### +* Added `tools/query_template_descrtiption.yml` for easy set-up of query + template datamodel. + ## [0.12.0] - 2023-07-07 ## ### Added ### diff --git a/src/doc/extension/query_templates.rst b/src/doc/extension/query_templates.rst index 8c331386468c4392e6f2afa7d02264fb5cc1eadb..8d110bb84a0993d29b4cff70649640e770786d3b 100644 --- a/src/doc/extension/query_templates.rst +++ b/src/doc/extension/query_templates.rst @@ -2,6 +2,13 @@ Query shortcuts =============== +.. warning:: + + Until they have been `re-implemented + <https://gitlab.com/caosdb/caosdb-webui/-/issues/229>`__ for the new query + panel which has been introduced in CaosDB WebUI 0.11, query shortcuts only + work with the legacy query panel. + Introduction ============ @@ -221,3 +228,10 @@ The solution is to create the RecordTypes, e.g. using the Python interface, as f ).add_property("templateDescription", importance=caosdb.OBLIGATORY), ]) datamodel.insert() + + +The data model is also included in the ``tools/query_template_datamodel.yml`` +within this repository which can be imported into your database with ``python -m +caosadvancedtools.models.parser --sync query_template_datamodel.yml`` (you need +to have `CaosDB Advanced User +Tools<https://pypi.org/project/caosadvancedtools/>`__ installed and configured). diff --git a/tools/query_template_datamodel.yml b/tools/query_template_datamodel.yml new file mode 100644 index 0000000000000000000000000000000000000000..66a093b441c9bf80bf27e087b641b49b8f35a1e5 --- /dev/null +++ b/tools/query_template_datamodel.yml @@ -0,0 +1,9 @@ +# Insert this into your LinkAhead datamodel to enable query templates. +UserTemplate: + obligatory_properties: + Query: + datatype: TEXT + description: Query string of the query template, see https://docs.indiscale.com/caosdb-webui/extension/query_templates.html + templateDescription: + datatype: TEXT + description: Description of the query template which will be readable to the user.