File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const db = new SQL.Database();
40
40
41
41
42
42
// Execute a single SQL string that contains multiple statements
43
- sqlstr = " CREATE TABLE hello (a int, b char); \
43
+ let sqlstr = " CREATE TABLE hello (a int, b char); \
44
44
INSERT INTO hello VALUES (0, 'hello'); \
45
45
INSERT INTO hello VALUES (1, 'world');" ;
46
46
db .run (sqlstr); // Run the query without returning anything
@@ -60,13 +60,6 @@ stmt.free();
60
60
// You can not use your statement anymore once it has been freed.
61
61
// But not freeing your statements causes memory leaks. You don't want that.
62
62
63
- // Execute a single SQL string that contains multiple statements
64
- let sqlstr =
65
- " CREATE TABLE hello (a int, b char); \
66
- INSERT INTO hello VALUES (0, 'hello'); \
67
- INSERT INTO hello VALUES (1, 'world');" ;
68
- db .run (sqlstr); // Run the query without returning anything
69
-
70
63
const res = db .exec (" SELECT * FROM hello" );
71
64
/*
72
65
[
You can’t perform that action at this time.
0 commit comments