1
1
# SQLite
2
2
3
- <!-- introduced_in=REPLACEME -->
3
+ <!-- introduced_in=v22.5.0 -->
4
4
5
5
<!-- YAML
6
- added: REPLACEME
6
+ added: v22.5.0
7
7
-->
8
8
9
9
> Stability: 1.1 - Active development
@@ -85,7 +85,7 @@ console.log(query.all());
85
85
## Class: ` DatabaseSync `
86
86
87
87
<!-- YAML
88
- added: REPLACEME
88
+ added: v22.5.0
89
89
-->
90
90
91
91
This class represents a single [ connection] [ ] to a SQLite database. All APIs
@@ -94,7 +94,7 @@ exposed by this class execute synchronously.
94
94
### ` new DatabaseSync(location[, options]) `
95
95
96
96
<!-- YAML
97
- added: REPLACEME
97
+ added: v22.5.0
98
98
-->
99
99
100
100
* ` location ` {string} The location of the database. A SQLite database can be
@@ -112,7 +112,7 @@ Constructs a new `DatabaseSync` instance.
112
112
### ` database.close() `
113
113
114
114
<!-- YAML
115
- added: REPLACEME
115
+ added: v22.5.0
116
116
-->
117
117
118
118
Closes the database connection. An exception is thrown if the database is not
@@ -121,7 +121,7 @@ open. This method is a wrapper around [`sqlite3_close_v2()`][].
121
121
### ` database.exec(sql) `
122
122
123
123
<!-- YAML
124
- added: REPLACEME
124
+ added: v22.5.0
125
125
-->
126
126
127
127
* ` sql ` {string} A SQL string to execute.
@@ -133,7 +133,7 @@ file. This method is a wrapper around [`sqlite3_exec()`][].
133
133
### ` database.open() `
134
134
135
135
<!-- YAML
136
- added: REPLACEME
136
+ added: v22.5.0
137
137
-->
138
138
139
139
Opens the database specified in the ` location ` argument of the ` DatabaseSync `
@@ -143,7 +143,7 @@ the constructor. An exception is thrown if the database is already open.
143
143
### ` database.prepare(sql) `
144
144
145
145
<!-- YAML
146
- added: REPLACEME
146
+ added: v22.5.0
147
147
-->
148
148
149
149
* ` sql ` {string} A SQL string to compile to a prepared statement.
@@ -155,7 +155,7 @@ around [`sqlite3_prepare_v2()`][].
155
155
## Class: ` StatementSync `
156
156
157
157
<!-- YAML
158
- added: REPLACEME
158
+ added: v22.5.0
159
159
-->
160
160
161
161
This class represents a single [ prepared statement] [ ] . This class cannot be
@@ -172,7 +172,7 @@ over hand-crafted SQL strings when handling user input.
172
172
### ` statement.all([namedParameters][, ...anonymousParameters]) `
173
173
174
174
<!-- YAML
175
- added: REPLACEME
175
+ added: v22.5.0
176
176
-->
177
177
178
178
* ` namedParameters ` {Object} An optional object used to bind named parameters.
@@ -191,7 +191,7 @@ the values in `namedParameters` and `anonymousParameters`.
191
191
### ` statement.expandedSQL() `
192
192
193
193
<!-- YAML
194
- added: REPLACEME
194
+ added: v22.5.0
195
195
-->
196
196
197
197
* Returns: {string} The source SQL expanded to include parameter values.
@@ -203,7 +203,7 @@ placeholders replaced by values. This method is a wrapper around
203
203
### ` statement.get([namedParameters][, ...anonymousParameters]) `
204
204
205
205
<!-- YAML
206
- added: REPLACEME
206
+ added: v22.5.0
207
207
-->
208
208
209
209
* ` namedParameters ` {Object} An optional object used to bind named parameters.
@@ -223,7 +223,7 @@ values in `namedParameters` and `anonymousParameters`.
223
223
### ` statement.run([namedParameters][, ...anonymousParameters]) `
224
224
225
225
<!-- YAML
226
- added: REPLACEME
226
+ added: v22.5.0
227
227
-->
228
228
229
229
* ` namedParameters ` {Object} An optional object used to bind named parameters.
@@ -248,7 +248,7 @@ values in `namedParameters` and `anonymousParameters`.
248
248
### ` statement.setAllowBareNamedParameters(enabled) `
249
249
250
250
<!-- YAML
251
- added: REPLACEME
251
+ added: v22.5.0
252
252
-->
253
253
254
254
* ` enabled ` {boolean} Enables or disables support for binding named parameters
@@ -273,7 +273,7 @@ are several caveats to be aware of when enabling bare named parameters:
273
273
### ` statement.setReadBigInts(enabled) `
274
274
275
275
<!-- YAML
276
- added: REPLACEME
276
+ added: v22.5.0
277
277
-->
278
278
279
279
* ` enabled ` {boolean} Enables or disables the use of ` BigInt ` s when reading
@@ -289,7 +289,7 @@ supported at all times.
289
289
### ` statement.sourceSQL() `
290
290
291
291
<!-- YAML
292
- added: REPLACEME
292
+ added: v22.5.0
293
293
-->
294
294
295
295
* Returns: {string} The source SQL used to create this prepared statement.
0 commit comments