Commit Graph
94 Commits
Author SHA1 Message Date
Matteo Collina fd41198dff sqlite: fix use-after-free in Exec() and ApplyChangeset()
When sqlite3_exec() or sqlite3changeset_apply() call JavaScript
callbacks (user-defined functions, conflict handlers, or filter
callbacks), the DatabaseSync object could be garbage-collected
if the JavaScript code drops all references to it. Both methods
only held a raw DatabaseSync* pointer on the C++ stack, which
V8 GC does not track.

Add a BaseObjectPtr<DatabaseSync> guard that keeps the database
alive for the duration of these SQLite API calls, preventing a
use-after-free when the JavaScript callback triggers GC.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64535
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-23 14:37:21 +00:00
Guilherme Araújo 47e332d227 sqlite: read column count after step in StatementSync.all()
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64219
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-07 12:40:43 +00:00
Yagiz Nizipli cf89b61932 sqlite: do not leave database open after failed open
When sqlite3_open_v2() fails, SQLite still assigns a database handle
in a "sick" state. Such a handle may only be used to retrieve the
error and must then be released with sqlite3_close(). Keeping it in
connection_ meant that after a failed open():

- isOpen incorrectly reported true,
- every method passed the "database is not open" check and called
  SQLite APIs on the sick handle, which is an API misuse,
- registering a user-defined function leaked its user data in builds
  with SQLITE_ENABLE_API_ARMOR, because SQLite rejects the call
  before taking ownership of the user data,
- open() could not be retried since the database appeared open.

Close and reset the connection handle when open() fails at any point
so that the database remains closed and open() can be retried.

Fixes: https://github.com/nodejs/node/issues/63831
Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/63854
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-06-16 16:29:30 +00:00
ndossche 25ffc1a164 sqlite: fix stack-use-after-scope with function callback
The `hasIt` block has `Local<Function>`s, but it's capture in the
lambda, yet the lambda is used after the locals go out of scope.

Signed-off-by: ndossche <nora.dossche@ugent.be>
PR-URL: https://github.com/nodejs/node/pull/63640
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-06-05 12:15:51 +02:00
Antoine du Hamel b9203ee79f src,sqlite: only pass xFilter when user provided a callback
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63516
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-05-25 17:20:10 +00:00
Edy Silva 6009d937f5 src,sqlite: remove dead code
Signed-off-by: geeksilva97 <edigleyssonsilva@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63204
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2026-05-12 13:06:54 +00:00
Matteo Collina b5da7515f9 sqlite: keep source database alive during backup
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/62673
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-06 23:09:55 +00:00
Igor Sheludko 8aea917381 src: stop using v8::PropertyCallbackInfo<T>::This()
Refs: https://github.com/nodejs/node/issues/60616
PR-URL: https://github.com/nodejs/node/pull/61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-04-24 18:01:35 +02:00
Ali Hassan ef8f8f886c sqlite: use OneByte for ASCII text and internalize col names
Use simdutf to detect ASCII text values and create them
via NewFromOneByte for compact one-byte representation.
Internalize column name strings with kInternalized so V8
shares hidden classes across row objects. Cache column
names on StatementSync for iterate(), invalidated via
SQLITE_STMTSTATUS_REPREPARE on schema changes.

Refs: https://github.com/nodejs/performance/issues/181
PR-URL: https://github.com/nodejs/node/pull/61954
Refs: https://github.com/nodejs/performance/issues/181
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2026-04-11 10:37:30 +00:00
Ali Hassan 4a41a002f6 sqlite: add serialize() and deserialize()
Add database.serialize() and database.deserialize() methods to
DatabaseSync, wrapping the sqlite3_serialize and sqlite3_deserialize
C APIs. These allow extracting an in-memory database as a Uint8Array
and loading one back, enabling snapshots, cloning, and transfer of
databases without filesystem I/O.

Refs: https://github.com/nodejs/node/issues/62575
PR-URL: https://github.com/nodejs/node/pull/62579
Refs: https://github.com/nodejs/node/issues/62575
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-04-10 20:40:01 +00:00
Edy Silva 40c625b0fd src,sqlite: fix filterFunc dangling reference
PR-URL: https://github.com/nodejs/node/pull/62281
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-03-18 16:15:32 +00:00
Anna Henningsen b872cc2fcf src: make AsyncWrap subclass internal field counts explicit
This helps ensure that we already set the correct number of
internal fields when creating objects, even if the number of
internal fields of e.g. AsyncWrap changes over time.

PR-URL: https://github.com/nodejs/node/pull/62103
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-03-06 16:44:32 +00:00
Guilherme Araújo 88be44db0e sqlite: handle stmt invalidation
PR-URL: https://github.com/nodejs/node/pull/61877
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-03-02 23:29:14 +00:00
Mert Can Altin 35d3bc8fe8 sqlite: add limits property to DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/61298
Fixes: https://github.com/nodejs/node/issues/61268
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-02-27 19:00:28 +00:00
Anna Henningsen ad945c599c src: remove unnecessary c_str() conversions in diagnostic messages
PR-URL: https://github.com/nodejs/node/pull/61786
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-14 10:45:51 +00:00
Ali Hassan 346ad95c3c sqlite: avoid extra copy for large text binds
When binding UTF-8 strings to prepared statements, transfer ownership of
malloc-backed Utf8Value buffers to SQLite to avoid an extra copy for
large strings. Use sqlite3_bind_blob64() when binding BLOB parameters.

PR-URL: https://github.com/nodejs/node/pull/61580
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2026-02-07 18:52:38 +00:00
Mert Can Altin e7d6728aef sqlite: use DictionaryTemplate for run() result
PR-URL: https://github.com/nodejs/node/pull/61432
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2026-02-05 14:30:42 +00:00
Bart Louwers f6464c57f6 sqlite: change approach to fix segfault SQLTagStore
PR-URL: https://github.com/nodejs/node/pull/60462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2026-01-31 06:35:30 +00:00
Guilherme Araújo 68d7b6f870 sqlite: reserve vectors space
PR-URL: https://github.com/nodejs/node/pull/61540
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-01-29 02:22:05 +00:00
Tobias Nießen a35944685a src: use C++ nullptr in sqlite
Refs: https://github.com/nodejs/node/pull/61407
PR-URL: https://github.com/nodejs/node/pull/61416
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-01-19 23:57:12 +00:00
Guilherme Araújo efa7621132 sqlite: add sqlite prepare options args
PR-URL: https://github.com/nodejs/node/pull/61311
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2026-01-19 23:27:03 +00:00
Pramit Sharma 9c346d22a7 sqlite: improve error messages for tag store
When using SQLite tag store functions (sql.get`, sql.run`, etc.),
preparation errors now show descriptive SQLite error messages instead
of the generic 'Failed to prepare statement' message.

The tag store's GetOrCreateStatement function now passes the database
object to THROW_ERR_SQLITE_ERROR, allowing it to retrieve the actual
error message from sqlite3_errmsg(), matching the behavior of the
regular db.prepare() method.

Fixes: https://github.com/nodejs/node/issues/61051
PR-URL: https://github.com/nodejs/node/pull/61096
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-12-27 00:04:05 +00:00
Michaël Zasso 9a6e55ab3d src: remove unused private field in SQLTagStore
PR-URL: https://github.com/nodejs/node/pull/61027
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-12-20 06:22:38 +00:00
René a1f421feb6 sqlite: make SQLTagStore.prototype.size a getter
Drive-by: make callback `args` parameter names consistent
PR-URL: https://github.com/nodejs/node/pull/60246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-12-11 02:29:09 +00:00
Bart Louwers fd7b33e763 sqlite: allow setting defensive flag
PR-URL: https://github.com/nodejs/node/pull/60217
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-10-27 14:01:16 +00:00
Anna Henningsen 39447be4e4 src: use Utf8Value and TwoByteValue instead of V8 helpers
Our own helper classes have the advantage of using stack storage
a lot of the time, so they should always be preferred.

PR-URL: https://github.com/nodejs/node/pull/60244
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2025-10-17 09:17:01 +00:00
James M Snell 2869c1255b src: correct the error handling in StatementExecutionHelper
Error handling logic was flawed in StatementExecutionHelper
methods.

PR-URL: https://github.com/nodejs/node/pull/60040
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-10-04 12:51:20 -07:00
Michaël Zasso 5623194a6b doc,src,test: replace use of deprecated GetIsolate
`Isolate::GetCurrent()` should be used instead as it returns the same
thing.

Refs: https://github.com/v8/v8/commit/5c4a937aafff2ca21257387510101737afbf10ab
PR-URL: https://github.com/nodejs/node/pull/59805
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-10-04 18:48:35 +02:00
Guilherme Araújo b217051d36 sqlite: create authorization api
PR-URL: https://github.com/nodejs/node/pull/59928
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-10-01 11:40:45 +02:00
Anna Henningsen e4e859efc3 src: remove useless dereferencing in THROW_...
Our `THROW_...` helpers can handle strings or string views just fine,
all this does is add an extra `strlen()` call that can and should
be avoided.

PR-URL: https://github.com/nodejs/node/pull/60054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-30 15:36:58 +02:00
Edy Silva 413693481f sqlite: replace ToLocalChecked and improve filter error handling
PR-URL: https://github.com/nodejs/node/pull/60028
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-30 15:30:25 +02:00
Bart Louwers d2ff9daf58 sqlite: fix crash session extension callbacks with workers
PR-URL: https://github.com/nodejs/node/pull/59848
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-09-23 14:41:39 +00:00
0hm☘️ 97e55f8ea2 sqlite: add tagged template
This pr introduces the support for tagged templates
And an LRU to cache the templates. We introduced a
new object called SqlTagStore that holds the ref
to Lru. This acts as the main object that allows
us to use tagged templates.

PR-URL: https://github.com/nodejs/node/pull/58748
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-09-17 16:54:11 +00:00
Moonki Choi db926dc1fc src: replace FIXED_ONE_BYTE_STRING with Environment-cached strings
PR-URL: https://github.com/nodejs/node/pull/59891
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-09-17 06:34:40 +00:00
Moonki Choi 01bc7286fb src: remove unnecessary Environment::GetCurrent() calls
PR-URL: https://github.com/nodejs/node/pull/59814
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-09-11 06:45:38 +00:00
James M Snell 8ec29f24fc src: use DictionaryTemplate for node_url_pattern
Improved API and better performance:

```
url/urlpattern-parse.js n=100000 ... ***  11.59 %  ±0.96% ±1.28% ±1.66%
url/urlpattern-parse.js n=100000 ... ***   9.28 %  ±0.94% ±1.25% ±1.63%
url/urlpattern-parse.js n=100000 ... ***   6.97 %  ±0.97% ±1.29% ±1.70%
url/urlpattern-parse.js n=100000 ... ***   7.56 %  ±0.92% ±1.22% ±1.59%
url/urlpattern-test.js n=100000  ... ***   2.84 %  ±1.50% ±2.00% ±2.61%
url/urlpattern-test.js n=100000  ... ***   4.13 %  ±2.14% ±2.84% ±3.70%
url/urlpattern-test.js n=100000  ... ***   4.76 %  ±1.43% ±1.91% ±2.49%
url/urlpattern-test.js n=100000  ... ***   4.44 %  ±1.26% ±1.68% ±2.19%
```

PR-URL: https://github.com/nodejs/node/pull/59802
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-09-10 05:34:54 +00:00
Edy Silva 961554c89d src,sqlite: refactor value conversion
PR-URL: https://github.com/nodejs/node/pull/59659
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-09-02 02:57:19 +00:00
Michaël Zasso 45a8b5503e src: use non-deprecated Get/SetPrototype methods
Refs: https://github.com/v8/v8/commit/5e139e98d1e4d8bbcccf7b15cd8e7d08b28e4a81
PR-URL: https://github.com/nodejs/node/pull/59671
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-08-31 20:17:31 +00:00
Alex Yang d1eabcb044 sqlite: add sqlite-type symbol for DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/59405
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-08-23 21:45:43 +00:00
Edy Silva 3c1521cfa0 sqlite: handle ?NNN parameters as positional
PR-URL: https://github.com/nodejs/node/pull/59350
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-08-22 12:56:58 +00:00
Tobias Nießen d36941d65d sqlite: avoid useless call to FromMaybe()
PR-URL: https://github.com/nodejs/node/pull/59490
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-08-18 10:26:41 +00:00
Miguel Marcondes Filho d08513dfc7 sqlite: add support for readBigInts option in db connection level
PR-URL: https://github.com/nodejs/node/pull/58697
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
2025-06-24 14:26:07 +00:00
James M Snell 62ba6196d4 sqlite: cleanup ERM support and export Session class
Update sqlite Session to support Symbol.dispose and
move the definition of the dispose methods to c++ to
close the open TODO

PR-URL: https://github.com/nodejs/node/pull/58378
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-05-30 17:21:30 -07:00
Colin Ihrig e201299011 sqlite: handle thrown errors in result callback
This commit updates the aggregate function 'result' callback
handling to not crash when an exception is thrown.

Fixes: https://github.com/nodejs/node/issues/58425
PR-URL: https://github.com/nodejs/node/pull/58426
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-05-25 21:49:37 +00:00
James M Snell 33505d1bb0 src: make a number of minor improvements to buffer
When using Buffer::New with an externally allocated buffer and
v8 sandbox enabled, defer to copy instead of wrapping the buffer.

Also, when immediately memcpy'ing into the full buffer, allocate
the buffer with kUninitialized as a slight perf optimization.

PR-URL: https://github.com/nodejs/node/pull/58377
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2025-05-24 14:11:22 -07:00
Livia Medeiros 770be2c79e sqlite: set name and length on sqlite.backup()
PR-URL: https://github.com/nodejs/node/pull/58251
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-05-11 16:11:28 +00:00
Jonas 68cc1c9cd3 src: add dcheck_eq for Object::New constructor calls
PR-URL: https://github.com/nodejs/node/pull/57943
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-22 19:21:15 +00:00
Edy Silva e9b286ca4b sqlite: add location method
PR-URL: https://github.com/nodejs/node/pull/57860
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-21 14:57:15 +00:00
Colin Ihrig 2e0ec72f54 sqlite: add getter to detect transactions
This commit adds an isTransaction getter to the DatabaseSync
class for determining if the database is currently within a
transaction.

Fixes: https://github.com/nodejs/node/issues/57922
PR-URL: https://github.com/nodejs/node/pull/57925
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-04-20 15:57:42 +00:00
Edy Silva 63640eb32d src: fix typo in comments
PR-URL: https://github.com/nodejs/node/pull/57868
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-04-19 09:33:47 +00:00