kivy_helper_search fixes

This commit is contained in:
lakshyacis 2019-11-21 15:37:22 +05:30
parent ccc21b33b0
commit 6c9d1a2666
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -1,6 +1,5 @@
"""
src/bitmessagekivy/kivy_helper_search.py
=================================
Sql queries for bitmessagekivy
"""
from helper_sql import sqlQuery
@ -14,14 +13,15 @@ def search_sql(xAddress="toaddress", account=None, folder="inbox", where=None, w
what = None
if folder == "sent" or folder == "draft":
sqlStatementBase = '''
SELECT toaddress, fromaddress, subject, message, status, ackdata, lastactiontime
FROM sent '''
sqlStatementBase = (
'''SELECT toaddress, fromaddress, subject, message, status, ackdata,'''
''' lastactiontime FROM sent ''')
elif folder == "addressbook":
sqlStatementBase = '''SELECT label, address From addressbook '''
else:
sqlStatementBase = '''SELECT folder, msgid, toaddress, message, fromaddress, subject, received, read
FROM inbox '''
sqlStatementBase = (
'''SELECT folder, msgid, toaddress, message, fromaddress, subject,'''
''' received, read FROM inbox ''')
sqlStatementParts = []
sqlArguments = []