Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit edb9aa6

Browse files
committed
Improve the readablity of the code in the readme.
1 parent e81a68a commit edb9aa6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ console.log(result); // Will print {a:1, b:'world'}
6161
// Bind other values
6262
stmt.bind([0, 'hello']);
6363
while (stmt.step()) console.log(stmt.get()); // Will print [0, 'hello']
64+
// free the memory used by the statement
65+
stmt.free();
66+
// You can not use your statement anymore once it has been freed.
67+
// But not freeing your statements causes memory leaks. You don't want that.
6468

6569
// You can also use JavaScript functions inside your SQL code
6670
// Create the js function you need
@@ -70,11 +74,6 @@ db.create_function("add_js", add);
7074
// Run a query in which the function is used
7175
db.run("INSERT INTO hello VALUES (add_js(7, 3), add_js('Hello ', 'world'));"); // Inserts 10 and 'Hello world'
7276

73-
// free the memory used by the statement
74-
stmt.free();
75-
// You can not use your statement anymore once it has been freed.
76-
// But not freeing your statements causes memory leaks. You don't want that.
77-
7877
// Export the database to an Uint8Array containing the SQLite database file
7978
var binaryArray = db.export();
8079
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /