longbox

comic book stash manager
git clone git://git.pyratebeard.net/longbox.git
Log | Files | Refs | README

commit 3961a5ccbed81f55137a8935bcdc243c552f7143
parent 3ec79506e9aade7c6d98f77edf379226607cecf2
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 29 Sep 2022 22:53:32 +0100

sqlite statements

Diffstat:
Mlongbox | 44++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+), 0 deletions(-)

diff --git a/longbox b/longbox @@ -164,6 +164,50 @@ else: GROUP BY gcd_issue.number """ +if stash: + stash_show_tables = """ + SELECT name FROM sqlite_master WHERE type='table'; + """ + + stash_create_table = """ + CREATE TABLE IF NOT EXISTS {} ( + stash_issue_id INT(11), + stash_series_name VARCHAR(255), + stash_issue_number VARCHAR(50), + stash_variant_name VARCHAR(255), + stash_series_year INT, + stash_series_id INT(11), + stash_issue_date VARCHAR(255), + stash_barcode VARCHAR(38) + ); + """.format(stash_category) + + stash_show_category = """ + SELECT * FROM {}; + """.format(stash_category) + + stash_issue = """ + INSERT INTO {} ( + stash_issue_id, + stash_series_name, + stash_issue_number, + stash_variant_name, + stash_series_year, + stash_series_id, + stash_issue_date, + stash_barcode + ) VALUES ( + ?, + ?, + ?, + ?, + ?, + ?, + ?, + ? + ); + """.format(stash_category) + #░ prettytable short var x = PrettyTable() x.align = "l"