Skip to content

v0.2.48..v0.2.49 changeset HootApiDb.h

Garret Voltz edited this page Oct 2, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/HootApiDb.h b/hoot-core/src/main/cpp/hoot/core/io/HootApiDb.h
index 5f6eb1c..f28e2c2 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/HootApiDb.h
+++ b/hoot-core/src/main/cpp/hoot/core/io/HootApiDb.h
@@ -187,8 +187,7 @@ public:
    *
    * @sa createPendingMapIndexes();
    *
-   * @param mapName Name of the map to create.
-   * @param userId User id of the map owner.
+   * @param mapName name of the map to create
    * @return
    */
   long insertMap(QString mapName);
@@ -233,7 +232,7 @@ public:
   long selectMapIdForCurrentUser(QString name);
 
   /**
-   * Returns all public map IDs for a map with the give name
+   * Returns all public map IDs for a map with the given name
    *
    * @param name map name
    * @return a collection of map IDs
@@ -241,6 +240,27 @@ public:
   std::set<long> selectPublicMapIds(QString name);
 
   /**
+   * Returns names for all public maps
+   *
+   * @return a collection of map names
+   */
+  QStringList selectPublicMapNames();
+
+  /**
+   * Returns IDs and names for all maps owned by the current user
+   *
+   * @return a collection of map names
+   */
+  QStringList selectMapNamesOwnedByCurrentUser();
+
+  /**
+   * Returns unique names for all maps owned by the current user, as well as all public maps
+   *
+   * @return a collection of map names
+   */
+  QStringList selectMapNamesAvailableToCurrentUser();
+
+  /**
    * Returns the IDs of all maps with the given name
    *
    * @param name map name
@@ -578,6 +598,8 @@ private:
   std::shared_ptr<QSqlQuery> _selectReserveNodeIds;
   std::shared_ptr<QSqlQuery> _selectMapIdsForCurrentUser;
   std::shared_ptr<QSqlQuery> _selectPublicMapIds;
+  std::shared_ptr<QSqlQuery> _selectPublicMapNames;
+  std::shared_ptr<QSqlQuery> _selectMapNamesOwnedByCurrentUser;
   std::shared_ptr<QSqlQuery> _selectMembersForRelation;
   std::shared_ptr<QSqlQuery> _updateNode;
   std::shared_ptr<QSqlQuery> _updateRelation;
Clone this wiki locally