Hi,
Please consider documentation updates for database.prepare() and database.run()/exec() etc to warn users of this behaviour. Ideally the API could be changed so that statement.free() executes when the JS statement object goes out of scope.
It appears that if database.prepare() is used, without corresponding use of statement.free() that "DROP TABLE" will fail with error "Uncaught Error: database table is locked".
The cause? It seems that SQLite has more stringent locking requirements for DROP compared to other DDL / DML statements.
Thanks
David