Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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-cpplib
Commits
d8e8d4cd
Commit
d8e8d4cd
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
DRAFT: Sketch idea for COUNT queries
parent
cac29af8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!7
ENH: Support FIND and COUNT queries
Pipeline
#11463
passed
3 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Pipeline: caosdb-cppinttest
#11465
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/caosdb/transaction.h
+11
-0
11 additions, 0 deletions
include/caosdb/transaction.h
with
11 additions
and
0 deletions
include/caosdb/transaction.h
+
11
−
0
View file @
d8e8d4cd
...
...
@@ -249,6 +249,17 @@ private:
std
::
unique_ptr
<
Entity
>
entity
;
};
// TODO(fspreck) One possibility for count-queries: Transaction gets a
// GetQueryCount function that returns exactly this. In case of a
// single FIND Query this will be equivalent to the Size of the
// ResultSet, but it may be different in case of Query + RetrieveById,
// and in case of COUNT queries which have an empty ResultSet. We have
// to think about how to extend this to transactions with more than
// one query in the future. My suggestion is to treat a transaction
// with more than one query as the union of the query results in which
// case the query count would return the cumulative number of
// results. This would even allow the combination of FIND, FIND
// unique, and COUNT, albeit a little strangely.
/**
* @brief Create a transaction via `CaosDBConnection.createTransaction()`
*/
...
...
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