Below is the file 'SQLTemplates.py' from this revision. You can also download the file.
#!/usr/bin/env python # SQL Templates create_fourstar_db = {} create_fourstar_db['CHART'] = "CREATE TABLE CHART ( accountid integer primary key autoincrement, details text, debitbalance boolean, info text)" create_fourstar_db['JOURNAL'] = "CREATE TABLE JOURNAL ( journalid integer primary key autoincrement, date text explanation text, postref integer, accountid integer, debit float, credit float)" create_fourstar_db['LEDGER'] = "CREATE TABLE LEDGER ( postid integer primary key autoincrement, accountid integer, date text, explanation text, journalref integer, debit float, credit float, balancedebit float, balancecredit float)" chart_sql = {} chart_sql['newledger'] = "INSERT INTO CHART (details, debitbalance, info) VALUES (?, ?, ?)" chart_sql['ledgerdetails'] = "SELECT accountid, details, debitbalance,info FROM CHART WHERE accountid='%s'" chart_sql['ledgerlist'] = "SELECT accountid FROM CHART"