Skip to content

Commit 3685949

Browse files
authored
Update api.js to improve documentation (#437)
* Update api.js to improve documentation To resolve #435 * Fix formatting Issues 1 * Fix formatting Issues 2
1 parent 1220b7b commit 3685949

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/api.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,13 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
239239
* You can't instantiate this class directly, you have to use a
240240
* {@link Database} object in order to create a statement.
241241
*
242-
* **Warning**: When you close a database (using db.close()),
243-
* all its statements are closed too and become unusable.
242+
* **Warnings**
243+
* 1. When you close a database (using db.close()), all
244+
* its statements are closed too and become unusable.
245+
* 1. After calling db.prepare() you must manually free the assigned memory
246+
* by calling Statement.free(). Failure to do this will cause subsequent
247+
* 'DROP TABLE ...' statements to fail with 'Uncaught Error: database table
248+
* is locked'.
244249
*
245250
* Statements can't be created by the API user directly, only by
246251
* Database::prepare

0 commit comments

Comments
 (0)