helper_sql #467
|
@ -1,22 +1,9 @@
|
||||||
import shared
|
from helper_sql import *
|
||||||
|
|
||||||
def insert(t):
|
def insert(t):
|
||||||
shared.sqlLock.acquire()
|
sqlExecute('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''', *t)
|
||||||
shared.sqlSubmitQueue.put(
|
|
||||||
'''INSERT INTO inbox VALUES (?,?,?,?,?,?,?,?,?)''')
|
|
||||||
shared.sqlSubmitQueue.put(t)
|
|
||||||
shared.sqlReturnQueue.get()
|
|
||||||
shared.sqlSubmitQueue.put('commit')
|
|
||||||
shared.sqlLock.release()
|
|
||||||
|
|
||||||
def trash(msgid):
|
def trash(msgid):
|
||||||
t = (msgid,)
|
sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid)
|
||||||
shared.sqlLock.acquire()
|
|
||||||
shared.sqlSubmitQueue.put(
|
|
||||||
'''UPDATE inbox SET folder='trash' WHERE msgid=?''')
|
|
||||||
shared.sqlSubmitQueue.put(t)
|
|
||||||
shared.sqlReturnQueue.get()
|
|
||||||
shared.sqlSubmitQueue.put('commit')
|
|
||||||
shared.sqlLock.release()
|
|
||||||
shared.UISignalQueue.put(('removeInboxRowByMsgid',msgid))
|
shared.UISignalQueue.put(('removeInboxRowByMsgid',msgid))
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user