CRUD added for snowflake

This commit is contained in:
Mel O'Hagan 2022-05-31 13:10:16 +01:00
parent fe3a774db3
commit 534cc9e6c8
1 changed files with 17 additions and 1 deletions

View File

@ -79,7 +79,7 @@ module SnowflakeModule {
})
}
async read(query: SqlQuery) {
async internalQuery(query: SqlQuery) {
await this.connectAsync()
let response: any = await new Promise((resolve, reject) =>
this.client.execute({
@ -97,6 +97,22 @@ module SnowflakeModule {
)
return response.rows
}
async create(query: SqlQuery) {
return this.internalQuery(query)
}
async read(query: SqlQuery) {
return this.internalQuery(query)
}
async update(query: SqlQuery) {
return this.internalQuery(query)
}
async delete(query: SqlQuery) {
return this.internalQuery(query)
}
}
module.exports = {