diff --git a/src/connection.ts b/src/connection.ts index d810acb16..3c03dd537 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -1920,6 +1920,10 @@ class Connection extends EventEmitter { * @private */ emit(event: 'databaseChange', databaseName: string): boolean + /** + * @private + */ + emit(event: 'databaseMirroringPartner', partnerInstanceName: string): boolean /** * @private */ diff --git a/src/token/handler.ts b/src/token/handler.ts index 0c259a723..f3dd52104 100644 --- a/src/token/handler.ts +++ b/src/token/handler.ts @@ -284,6 +284,10 @@ export class Login7TokenHandler extends TokenHandler { this.connection.emit('databaseChange', token.newValue); } + onDatabaseMirroringPartner(token: DatabaseMirroringPartnerEnvChangeToken) { + this.connection.emit('databaseMirroringPartner', token.newValue); + } + onLanguageChange(token: LanguageEnvChangeToken) { this.connection.emit('languageChange', token.newValue); } @@ -355,10 +359,6 @@ export class Login7TokenHandler extends TokenHandler { onPacketSizeChange(token: PacketSizeEnvChangeToken) { this.connection.messageIo.packetSize(token.newValue); } - - onDatabaseMirroringPartner(token: DatabaseMirroringPartnerEnvChangeToken) { - // Do nothing - } } /** @@ -406,6 +406,10 @@ export class RequestTokenHandler extends TokenHandler { this.connection.emit('databaseChange', token.newValue); } + onDatabaseMirroringPartner(token: DatabaseMirroringPartnerEnvChangeToken) { + this.connection.emit('databaseMirroringPartner', token.newValue); + } + onLanguageChange(token: LanguageEnvChangeToken) { this.connection.emit('languageChange', token.newValue); }