Runnable with both Python3 and Python2, with PyQt4 #2249

Open
kashikoibumi wants to merge 60 commits from kashikoibumi/py3 into v0.6
Showing only changes of commit f9d236444f - Show all commits

View File

@ -81,9 +81,13 @@ def sqlExecuteChunked(sql_statement, as_text, idCount, *args):
i:i + sqlExecuteChunked.chunkSize - (len(args) - idCount) i:i + sqlExecuteChunked.chunkSize - (len(args) - idCount)
] ]
if as_text: if as_text:
sqlSubmitQueue.put( q = ""
sql_statement.format(','.join('CAST(? AS TEXT)' * len(chunk_slice))) n = len(chunk_slice)
) for i in range(n):
q += "CAST(? AS TEXT)"
if i != n - 1:
q += ","
sqlSubmitQueue.put(sql_statement.format(q))
else: else:
sqlSubmitQueue.put( sqlSubmitQueue.put(
sql_statement.format(','.join('?' * len(chunk_slice))) sql_statement.format(','.join('?' * len(chunk_slice)))