diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2021-03-05 17:57:21 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2021-03-05 17:57:21 +0000 |
commit | 287034916bef5878a5565aec4141216fa6f133e6 (patch) | |
tree | c607cf3ced9819fe356fc13aa8757fb0bbb1a9d8 /database.py | |
parent | 64f4004d605cd0e576c3fc3fec95a7f118b4f20e (diff) | |
download | eda.gay-287034916bef5878a5565aec4141216fa6f133e6.tar.gz eda.gay-287034916bef5878a5565aec4141216fa6f133e6.zip |
drastically improved parser argument parser
Diffstat (limited to 'database.py')
-rw-r--r-- | database.py | 5 |
1 files changed, 5 insertions, 0 deletions
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, )) |