Ah, I see, now I've looked at the code I see that even if SQL was there to stay, it still wouldn't be very nice
It looks like it only really queries the SQL database once to get a big table of all the books, and then relies on python itself to do the searching and filtering ... I'd assumed that all the queries would be SQL.
Just playing around with database2.py and calibre-debug --update-module and extending the "SELECT * from meta" in the refresh function I've managed to make it do what I wanted, but as this is changing the master query the reported number of books in the database drops to only the number returned, and I could possibly damage my database by editing anything in this state. Looking through, though, it is probably safe as all the updates are done directly into the SQL and read back in.
|