@@ -59,7 +59,7 @@ public function import() : ViewResponse {
5959 }
6060
6161 /**
62- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-insertMany/
62+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-insertMany/
6363 */
6464 private static function importFromFile ($ documentsFilename , $ databaseName , $ collectionName ) : int {
6565
@@ -104,8 +104,18 @@ private static function importFromFile($documentsFilename, $databaseName, $colle
104104
105105 }
106106
107+ public function query () : ViewResponse {
108+
109+ AuthController::ensureUserIsLogged ();
110+
111+ return new ViewResponse (200 , 'queryDocuments ' , [
112+ 'databaseNames ' => DatabasesController::getDatabaseNames ()
113+ ]);
114+
115+ }
116+
107117 /**
108- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-insertOne/index.html
118+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-insertOne/index.html
109119 */
110120 public function insertOne () : JsonResponse {
111121
@@ -146,7 +156,7 @@ public function insertOne() : JsonResponse {
146156 }
147157
148158 /**
149- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-countDocuments/
159+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-countDocuments/
150160 */
151161 public function count () : JsonResponse {
152162
@@ -185,7 +195,7 @@ public function count() : JsonResponse {
185195 }
186196
187197 /**
188- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-deleteOne/index.html
198+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-deleteOne/index.html
189199 */
190200 public function deleteOne () : JsonResponse {
191201
@@ -224,7 +234,7 @@ public function deleteOne() : JsonResponse {
224234 }
225235
226236 /**
227- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-find/index.html
237+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-find/index.html
228238 */
229239 public function find () : JsonResponse {
230240
@@ -277,7 +287,7 @@ public function find() : JsonResponse {
277287 }
278288
279289 /**
280- * @see https://docs.mongodb.com/php-library/v1.6 /reference/method/MongoDBCollection-updateOne/index.html
290+ * @see https://docs.mongodb.com/php-library/v1.12 /reference/method/MongoDBCollection-updateOne/index.html
281291 */
282292 public function updateOne () : JsonResponse {
283293
0 commit comments