开发者

Query progressbar in sqlite and python

开发者 https://www.devze.com 2023-02-21 21:27 出处:网络
I want to create a progressbar for queries, say i have a query 开发者_JAVA技巧that will take 40 seconds, i\'d like to give some feedback to users on how long this will take and i found this code from

I want to create a progressbar for queries, say i have a query 开发者_JAVA技巧that will take 40 seconds, i'd like to give some feedback to users on how long this will take and i found this code from oracle that is exactly matches what i want. Is there a same thing in sqlite?

from timemachine import oracle

guesser=oracle(guess="SQL")
guesser.set_hint(driver="pypgsql")
guesser.set_hint(gui="wx")

expected_runtime=guesser.estimate("<put your query text here>")


Perhaps the set_progress_handler() method of the sqlite3.Connection objects could be of use?

0

精彩评论

暂无评论...
验证码 换一张
取 消