implement base template operations with the corresponding templates

fully implement the delete operation
todo:edit operation
This commit is contained in:
Tina_Azure
2023-05-15 19:32:21 +02:00
parent bbf526f99f
commit d9f3fd711c
6 changed files with 128 additions and 14 deletions

View File

@ -575,6 +575,17 @@ namespace Database {
return 0;
}
/*
* Executes the prepared statement DELETE_FREELANCER_TEMPLATE
* Deletes a templated based on the id and validated with the freelancer email
* Takes an open pqxx::connection the template id and the freelancers email
*/
void executePreparedStatement_DELETE_FREELANCER_TEMPLATE(pqxx::connection &connection, int templateID, const std::string& freelancerEmail) {
pqxx::work work(connection);
work.exec_prepared(PREPARED_STATEMENT_DELETE_FREELANCER_TEMPLATE, templateID, freelancerEmail);
work.commit();
}
/*
* Prepares a statement based on ID
* Takes an open pqxx::connection, the statement id