1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Update microsoftSqlServer.js

This commit is contained in:
Martin McKeaveney 2021-04-12 15:01:52 +01:00 committed by GitHub
parent 5993ae6242
commit 947da97d62

View file

@ -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 = {