Skip to content
Snippets Groups Projects
Commit d8e8d4cd authored by florian's avatar florian
Browse files

DRAFT: Sketch idea for COUNT queries

parent cac29af8
No related branches found
No related tags found
1 merge request!7ENH: Support FIND and COUNT queries
Pipeline #11463 passed
Pipeline: caosdb-cppinttest

#11465

    ......@@ -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()`
    */
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment