Skip to content

Commit b7bba92

Browse files
committed
don't add getConnectionId to the public interface
1 parent 691fdfe commit b7bba92

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/cli-repl/src/mongosh-repl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ class MongoshNodeRepl implements EvaluationListener {
442442
return {
443443
currentDatabaseAndConnection: () => {
444444
return {
445-
connectionId: instanceState.currentDb.getMongo().getConnectionId(),
445+
connectionId: instanceState.currentDb.getMongo()._getConnectionId(),
446446
databaseName: instanceState.currentDb.getName(),
447447
};
448448
},

packages/shell-api/src/mongo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export default class Mongo<
303303
) as CollectionWithSchema<M, M[KD], M[KD][KC]>;
304304
}
305305

306-
getConnectionId(): string {
306+
_getConnectionId(): string {
307307
return `connection_${this._connectionId}`;
308308
}
309309

packages/shell-api/src/shell-instance-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export class ShellInstanceState {
404404

405405
public getMongoByConnectionId(connectionId: string): Mongo {
406406
for (const mongo of this.mongos) {
407-
if (mongo.getConnectionId() === connectionId) {
407+
if (mongo._getConnectionId() === connectionId) {
408408
return mongo;
409409
}
410410
}

0 commit comments

Comments
 (0)