From 287034916bef5878a5565aec4141216fa6f133e6 Mon Sep 17 00:00:00 2001 From: jwansek Date: Fri, 5 Mar 2021 17:57:21 +0000 Subject: drastically improved parser argument parser --- database.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'database.py') diff --git a/database.py b/database.py index 6bf3c1f..181effb 100644 --- a/database.py +++ b/database.py @@ -84,6 +84,11 @@ class Database: WHERE thought_id = %s;""", (id_, )) return cursor.fetchone() + def update_thought_markdown(self, id_, markdown): + with self.__connection.cursor() as cursor: + cursor.execute("UPDATE thoughts SET markdown_text = %s WHERE thought_id = %s;", (markdown, id_)) + self.__connection.commit() + def get_categories_not(self, category_name): with self.__connection.cursor() as cursor: cursor.execute("SELECT category_name FROM categories WHERE category_name != %s;", (category_name, )) -- cgit v1.2.3