Skip to content

Commit b690143

Browse files
committed
Replace config call
Signed-off-by: worksofliam <[email protected]>
1 parent d741729 commit b690143

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/connection/syntaxChecker/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class SQLStatementChecker implements IBMiComponent {
4747

4848
private getLibrary(connection: IBMi) {
4949
if (!this.library) {
50-
this.library = connection?.config?.tempLibrary.toUpperCase() || `ILEDITOR`;
50+
this.library = connection?.getConfig()?.tempLibrary.toUpperCase() || `ILEDITOR`;
5151
}
5252

5353
return this.library;
@@ -79,7 +79,7 @@ export class SQLStatementChecker implements IBMiComponent {
7979
return -1;
8080
}
8181

82-
async getRemoteState(connection: IBMi) {
82+
async getRemoteState(connection: IBMi): Promise<ComponentState> {
8383
const lib = this.getLibrary(connection);
8484

8585
const wrapperVersion = await SQLStatementChecker.getVersionOf(connection, lib, WRAPPER_NAME);
@@ -98,7 +98,7 @@ export class SQLStatementChecker implements IBMiComponent {
9898
update(connection: IBMi): ComponentState | Promise<ComponentState> {
9999
return connection.withTempDirectory(async tempDir => {
100100
const tempSourcePath = posix.join(tempDir, `sqlchecker.sql`);
101-
await connection.content.writeStreamfileRaw(tempSourcePath, Buffer.from(this.getSource(connection), "utf-8"));
101+
await connection.getConfig().writeStreamfileRaw(tempSourcePath, Buffer.from(this.getSource(connection), "utf-8"));
102102
const result = await connection.runCommand({
103103
command: `RUNSQLSTM SRCSTMF('${tempSourcePath}') COMMIT(*NONE) NAMING(*SYS)`,
104104
noLibList: true

0 commit comments

Comments
 (0)