delete functionality for Vorgang in DB
This commit is contained in:
@@ -47,6 +47,19 @@ export const getVorgangByName = function (caseName: string) {
|
||||
return res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Vorgang
|
||||
* @param caseName
|
||||
* @returns int: number of changes
|
||||
*/
|
||||
export const deleteVorgangByName = function (caseName: string) {
|
||||
let delete_stmt = 'DELETE FROM cases WHERE name = ?';
|
||||
const stmt = db.prepare(delete_stmt);
|
||||
const info = stmt.run(caseName);
|
||||
|
||||
return info.changes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fetches list of vorgänge from s3 bucket
|
||||
* @returns list of available cases
|
||||
|
||||
Reference in New Issue
Block a user