From 5574c85068f5e2be300d2390f751794d16ab1f66 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Thu, 19 Oct 2023 15:17:16 -0500 Subject: [PATCH] fix(mongodb): Fix table completions in versions without mongosh --- internal/database/dialect/mongodb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/database/dialect/mongodb.go b/internal/database/dialect/mongodb.go index ffb1b132..3ba2d6bc 100644 --- a/internal/database/dialect/mongodb.go +++ b/internal/database/dialect/mongodb.go @@ -35,7 +35,7 @@ func (MongoDB) ListDatabasesQuery() string { } func (MongoDB) ListTablesQuery() string { - return "show collections" + return "db.getCollectionNames().forEach(function(collection){ print(collection) })" } func (MongoDB) UserEnvNames() []string {