diff --git a/packages/server/src/integrations/microsoftSqlServer.js b/packages/server/src/integrations/microsoftSqlServer.js index eea67a7256..ea26b6a2a7 100644 --- a/packages/server/src/integrations/microsoftSqlServer.js +++ b/packages/server/src/integrations/microsoftSqlServer.js @@ -37,6 +37,12 @@ const SCHEMA = { read: { type: "sql", }, + update: { + type: "sql", + }, + delete: { + type: "sql", + }, }, } @@ -71,6 +77,28 @@ class SqlServerIntegration { throw err } } + + async update(query) { + try { + await this.connect() + const response = await this.client.query(query.sql) + return response.recordset + } catch (err) { + console.error("Error querying MS SQL Server", err) + throw err + } + } + + async delete(query) { + try { + await this.connect() + const response = await this.client.query(query.sql) + return response.recordset + } catch (err) { + console.error("Error querying MS SQL Server", err) + throw err + } + } } module.exports = {