Skip to content

Commit 6f4b813

Browse files
authored
fix typing of encrypt and appName mssql settings (#7)
Signed-off-by: Matthew Peveler <[email protected]>
1 parent 7f84a6b commit 6f4b813

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/adapters/sqlserver.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ export default class SqlServerAdapter extends AbstractAdapter {
5656
}
5757

5858
configDatabase(): config {
59-
const config = {
59+
const config: config = {
6060
user: this.server.config.user,
6161
password: this.server.config.password,
6262
server: <string>this.server.config.host,
6363
database: this.database.database,
6464
port: this.server.config.port,
6565
requestTimeout: Infinity,
66-
appName: this.server.config.applicationName || 'sqlectron',
6766
domain: this.server.config.domain,
6867
pool: {
6968
max: 5,
7069
},
7170
options: {
72-
encrypt: this.server.config.ssl,
71+
encrypt: !!this.server.config.ssl,
72+
appName: this.server.config.applicationName || 'sqlectron',
7373
enableArithAbort: true,
7474
},
7575
};
@@ -79,7 +79,7 @@ export default class SqlServerAdapter extends AbstractAdapter {
7979
config.port = this.server.config.localPort;
8080
}
8181

82-
return <config>config;
82+
return config;
8383
}
8484

8585
async connect(): Promise<void> {

0 commit comments

Comments
 (0)