@@ -49,7 +49,7 @@ Promisified wrapper for the sqlite3#Database interface.
49
49
50
50
\+ ** new Database** (` config ` : [ Config] ( ../interfaces/_src_interfaces_.isqlite.config.md ) ): * [ Database] ( _src_database_.database.md ) *
51
51
52
- * Defined in [ src/Database.ts:18] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L18 ) *
52
+ * Defined in [ src/Database.ts:18] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L18 ) *
53
53
54
54
** Parameters:**
55
55
@@ -65,23 +65,23 @@ Name | Type |
65
65
66
66
• ** config** : * [ Config] ( ../interfaces/_src_interfaces_.isqlite.config.md ) *
67
67
68
- * Defined in [ src/Database.ts:17] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L17 ) *
68
+ * Defined in [ src/Database.ts:17] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L17 ) *
69
69
70
70
___
71
71
72
72
### db
73
73
74
74
• ** db** : * Driver*
75
75
76
- * Defined in [ src/Database.ts:18] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L18 ) *
76
+ * Defined in [ src/Database.ts:18] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L18 ) *
77
77
78
78
## Methods
79
79
80
80
### all
81
81
82
82
▸ ** all** ‹** T** ›(` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) , ...` params ` : any[ ] ): * Promise‹T›*
83
83
84
- * Defined in [ src/Database.ts:255] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L255 ) *
84
+ * Defined in [ src/Database.ts:255] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L255 ) *
85
85
86
86
Runs the SQL query with the specified parameters. The parameters are the same as the
87
87
Database#run function, with the following differences:
116
116
117
117
▸ ** close** (): * Promise‹void›*
118
118
119
- * Defined in [ src/Database.ts:79] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L79 ) *
119
+ * Defined in [ src/Database.ts:79] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L79 ) *
120
120
121
121
Closes the database.
122
122
128
128
129
129
▸ ** configure** (` option ` : [ ConfigureOption] ( ../modules/_src_interfaces_.isqlite.md#configureoption ) , ` value ` : any): * any*
130
130
131
- * Defined in [ src/Database.ts:94] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L94 ) *
131
+ * Defined in [ src/Database.ts:94] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L94 ) *
132
132
133
133
** ` see ` ** https://github.com/mapbox/node-sqlite3/wiki/API#databaseconfigureoption-value
134
134
147
147
148
148
▸ ** each** ‹** T** ›(` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) , ...` params ` : any[ ] ): * Promise‹number›*
149
149
150
- * Defined in [ src/Database.ts:187] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L187 ) *
150
+ * Defined in [ src/Database.ts:187] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L187 ) *
151
151
152
152
Runs the SQL query with the specified parameters and calls the callback once for each result
153
153
row. The parameters are the same as the Database#run function, with the following differences:
188
188
189
189
▸ ** exec** (` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) ): * Promise‹void›*
190
190
191
- * Defined in [ src/Database.ts:280] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L280 ) *
191
+ * Defined in [ src/Database.ts:280] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L280 ) *
192
192
193
193
Runs all SQL queries in the supplied string. No result rows are retrieved. If a query fails,
194
194
no subsequent statements will be executed (wrap it in a transaction if you want all
213
213
214
214
▸ ** get** ‹** T** ›(` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) , ...` params ` : any[ ] ): * Promise‹T | undefined›*
215
215
216
- * Defined in [ src/Database.ts:150] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L150 ) *
216
+ * Defined in [ src/Database.ts:150] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L150 ) *
217
217
218
218
Runs the SQL query with the specified parameters and resolves with
219
219
with the first result row afterwards. If the result set is empty, returns undefined.
242
242
243
243
▸ ** getDatabaseInstance** (): * Driver*
244
244
245
- * Defined in [ src/Database.ts:36] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L36 ) *
245
+ * Defined in [ src/Database.ts:36] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L36 ) *
246
246
247
247
Returns the underlying sqlite3 Database instance
248
248
254
254
255
255
▸ ** loadExtension** (` path ` : string): * Promise‹unknown›*
256
256
257
- * Defined in [ src/Database.ts:325] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L325 ) *
257
+ * Defined in [ src/Database.ts:325] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L325 ) *
258
258
259
259
Loads a compiled SQLite extension into the database connection object.
260
260
272
272
273
273
▸ ** migrate** (` config? ` : [ MigrationParams] ( ../interfaces/_src_interfaces_.imigrate.migrationparams.md ) ): * Promise‹void›*
274
274
275
- * Defined in [ src/Database.ts:340] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L340 ) *
275
+ * Defined in [ src/Database.ts:340] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L340 ) *
276
276
277
277
Performs a database migration.
278
278
290
290
291
291
▸ ** on** (` event ` : string, ` listener ` : any): * void*
292
292
293
- * Defined in [ src/Database.ts:29] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L29 ) *
293
+ * Defined in [ src/Database.ts:29] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L29 ) *
294
294
295
295
Event handler when verbose mode is enabled.
296
296
311
311
312
312
▸ ** open** (): * Promise‹void›*
313
313
314
- * Defined in [ src/Database.ts:43] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L43 ) *
314
+ * Defined in [ src/Database.ts:43] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L43 ) *
315
315
316
316
Opens the database
317
317
323
323
324
324
▸ ** parallelize** (): * void*
325
325
326
- * Defined in [ src/Database.ts:360] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L360 ) *
326
+ * Defined in [ src/Database.ts:360] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L360 ) *
327
327
328
328
** Returns:** * void*
329
329
333
333
334
334
▸ ** prepare** (` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) , ...` params ` : any[ ] ): * Promise‹[ Statement] ( _src_statement_.statement.md ) ‹Stmt››*
335
335
336
- * Defined in [ src/Database.ts:306] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L306 ) *
336
+ * Defined in [ src/Database.ts:306] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L306 ) *
337
337
338
338
Prepares the SQL statement and optionally binds the specified parameters.
339
339
When bind parameters are supplied, they are bound to the prepared statement.
355
355
356
356
▸ ** run** (` sql ` : [ SqlType] ( ../modules/_src_interfaces_.isqlite.md#sqltype ) , ...` params ` : any[ ] ): * Promise‹[ RunResult] ( ../interfaces/_src_interfaces_.isqlite.runresult.md ) ‹Stmt››*
357
357
358
- * Defined in [ src/Database.ts:112] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L112 ) *
358
+ * Defined in [ src/Database.ts:112] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L112 ) *
359
359
360
360
Runs the SQL query with the specified parameters. It does not retrieve any result data.
361
361
The function returns the Database object for which it was called to allow for function chaining.
377
377
378
378
▸ ** serialize** (): * void*
379
379
380
- * Defined in [ src/Database.ts:351] ( https://github.com/kriasoft/node-sqlite/blob/244b720 /src/Database.ts#L351 ) *
380
+ * Defined in [ src/Database.ts:351] ( https://github.com/kriasoft/node-sqlite/blob/d15b22e /src/Database.ts#L351 ) *
381
381
382
382
The methods underneath requires creative work to implement. PRs / proposals accepted!
383
383
0 commit comments