Minor updates

This commit is contained in:
2025-08-02 22:06:26 -04:00
parent 3d085666c8
commit 61488e2449
2 changed files with 10 additions and 14 deletions

View File

@@ -6,7 +6,6 @@ import json
from dotenv import load_dotenv
from datetime import date, datetime
load_dotenv
google_api_key = os.getenv('GOOGLE_API_KEY')

View File

@@ -1,6 +1,3 @@
collections_table_creation = '''
CREATE TABLE IF NOT EXISTS Collection_Item(
"id" BIGSERIAL PRIMARY KEY,
@@ -28,13 +25,13 @@ collections_table_creation = '''
def collection_insert_statement(book):
return 'INSERT INTO Collection_Item ' \
'(title, author, publisher, publishing_date, isbn, sort_title, format, '\
'language, categories, page_count, is_checked_in, is_archived, is_lost) '\
f'VALUES (\'{book['title']}\', \'{book['author']}\', '\
f'\'{book['publisher']}\', \'{book['publishing_date']}\', '\
f'\'{book['isbn']}\', \'{book['sort_title']}\',' \
f'\'{book['format']}\', \'{book['language']}\', '\
f'\'{book['categories']}\', \'{book['page_count']}\', '\
f'\'{book['is_checked_in']}\', \'{book['is_archived']}\', '\
f'\'{book['is_lost']}\');'
return ('INSERT INTO Collection_Item '
'(title, author, publisher, publishing_date, isbn, sort_title, format, '
'language, categories, page_count, is_checked_in, is_archived, is_lost) '
f'VALUES (\'{book['title']}\', \'{book['author']}\', '
f'\'{book['publisher']}\', \'{book['publishing_date']}\', '
f'\'{book['isbn']}\', \'{book['sort_title']}\','
f'\'{book['format']}\', \'{book['language']}\', '
f'\'{book['categories']}\', \'{book['page_count']}\', '
f'\'{book['is_checked_in']}\', \'{book['is_archived']}\', '
f'\'{book['is_lost']}\');')