Resolve "addButton (for demo)"

This commit is contained in:
Thomas Schleicher 2023-12-08 19:07:32 +00:00
parent 54b2b41ed2
commit 60712e8397
7 changed files with 210 additions and 25 deletions

View file

@ -95,6 +95,17 @@ export const executeQuery = async (query: string) => {
console.error("Query could not be executed!");
};
export const deleteExpenses = async () => {
try {
await db.transactionAsync(async (tx: SQLite.SQLTransactionAsync) => {
await tx.executeSqlAsync("DELETE FROM expense;");
});
} catch(error) {
console.log("Error deleting expense: ", error);
throw error;
}
}
export const deleteDatabase = () => {
closeDatabase().then(() => {
try {