Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
1fedfb7b
Verified
Commit
1fedfb7b
authored
2 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
DOC: update query tutorial
parent
89baf6a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!103
Quick main-release of documentation
,
!85
DOC: F find query
Pipeline
#30789
passed
2 years ago
Stage: linting
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/doc/tutorials/query.rst
+17
-15
17 additions, 15 deletions
src/doc/tutorials/query.rst
with
17 additions
and
15 deletions
src/doc/tutorials/query.rst
+
17
−
15
View file @
1fedfb7b
...
...
@@ -14,31 +14,31 @@ the webinterface under the respective menu entry.
Let's start with a simple one::
FIND
RECORD
MusicalInstrument
FIND MusicalInstrument
Most queries simply start with the ``FIND`` keyword and describe what we are
looking for behind that. The ``RECORD`` keyword denotes that we are only looking
for Records (and not Files, Properties or RecordTypes). Finally, we provided
a RecordType name: MusicalInstrument. This means that we will get all Records
that have this RecordType as parent. Try it out!
looking for behind that. Then, we provided a RecordType name:
MusicalInstrument. This means that we will get all Records that have this
RecordType as parent. Try it out!
Let's look at::
FIND Guitar
FIND
ENTITY
Guitar
When we leave out the ``RECORD`` keyword, we will get every entity that is a
Guitar. When you submit this query you should find also a RecordType Guitar
in the results. Using ``FIND RecordType Guitar`` would restrict the result to
only that RecordType.
When we add the ``ENTITY`` keyword we will get every entity that is a
Guitar -- also the RecordType, and even a Property with that name if there
exists one. Using ``FIND RecordType Guitar`` would restrict the result to
only that RecordType. And ``FIND RECORD MusicalInstrument`` is just equivalent
to ``FIND MusicalInstrument``.
Note, that you cannot only provide RecordType names after the ``FIND``, but names
in general: ``FIND
RECORD
Nice Guitar``. This will give you a Record with the
in general: ``FIND
"
Nice Guitar
"
``. This will give you a Record with the
name "Nice Guitar" (if one exists... and there should be one in the demo instance).
While it does not matter whether you use capital letters or not, the names have to
be exact. There are two features that make it easy to use names for querying
in spite of this:
- You can use "*" to match any string. E.g. ``FIND
RECORD
Nice*``
- You can use "*" to match any string. E.g. ``FIND Nice*``
- After typing three letters, names that start with those three are
suggested by the auto completion.
...
...
@@ -64,7 +64,9 @@ result set. In general this looks like::
FIND <Name> <Property Filter>
Typically, the filter has the form ``<Property> <Operator> <Value>``,
for example ``length >= 0.7mm``.
for example ``length >= 0.7mm``. Instead of the ``<Name>`` you can also use one
of the entity roles, namely ``RECORD``, ``RECORDTYPE``, ``FILE``, ``PROPERY``,
or ``ENTITY``.
There are many filters available. You can check the specification for a comprehensive description of
those. Here, we will only look at the most common examples.
...
...
@@ -72,7 +74,7 @@ those. Here, we will only look at the most common examples.
If you only want to assure that Records have a certain Property, without imposing
constrains on the value, you can use::
FIND
RECORD
MusicalInstrument WITH Manufacturer
FIND MusicalInstrument WITH Manufacturer
Similarly, to what we saw above when using incomplete names, you can use a "*"
...
...
@@ -138,6 +140,6 @@ information in a table. A comma separated list of Property names can be provided
Or::
SELECT quality_factor, report, date FROM
Analysis WHICH REFERENCES A Guitar WITH electric=TRUE
SELECT quality_factor, report, date FROM Analysis WHICH REFERENCES A Guitar WITH electric=TRUE
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment