Quote:
Originally Posted by Pinguin44
Code:
AttributeError: 'LibraryDatabase2' object has no attribute 'execute'
|
Hi, I encountered the same issue for a sql update today: after a massive import on my new calibre-server, I wanted to set the timestamp to the published date
If anyone is stuck like I was: you can call execute() through db.conn
e.g.:
Code:
calibre-debug -c "from calibre.library.database2 import LibraryDatabase2;
db = LibraryDatabase2('/home/path/to/my/calibre-library/');
db.conn.execute('update books set timestamp=pubdate');
db.conn.commit();"
Happy holidays!