175 Commits
Author SHA1 Message Date
Mahesh Bandara Wijerathna 710c41a542 Merge Node-API refactor from upstream 2026-07-24 15:29:56 +05:30
Mahesh Bandara WijerathnaandAlexander Prinzhorn 29c1abe314 Increase timeout test because of GitHub Action
Co-authored-by: Alexander Prinzhorn <[email protected]>
2025-05-15 16:37:11 +05:30
Mahesh Bandara Wijerathna a87349be67 Add tests for UPDATE_DELETE_LIMIT 2025-01-29 05:02:16 +05:30
Mahesh Bandara WijerathnaandMatthew McEachen 1d7ed912df Relax allowed timeout (GHA on macOS is slow)
Co-authored-by: Matthew McEachen <[email protected]>
2024-05-31 15:51:10 +05:30
Mahesh Bandara WijerathnaandGitHub 14d2275090 Update SQLite3MultipleCiphers to v1.8.4 (SQLite 3.45.2) (#89)
* Update `SQLite3MultipleCiphers` to `v1.8.4` (SQLite `3.45.2`)

* Fix serialize tests for an empty database
2024-04-10 13:33:44 +05:30
Mahesh Bandara WijerathnaandJoshua Wise 49c9688037 Calculate timeout test delta from the given timeout
Co-authored-by: Joshua Wise <[email protected]>
2023-09-05 12:43:21 +05:30
Mahesh Bandara Wijerathna 016a97aed7 Increase timeout test delta to 1200 ms
This test was weirdly failing on mac because of a sudden latency in the latest SQLite build. Slapping on a bandage for now.
2023-08-27 17:30:45 +05:30
Mahesh Bandara WijerathnaandArimah Greene 304ccb9bcd Fix out-of-bounds read in statement tail parser
* Fix out-of-bounds read in statement tail parser

* Add comment with link to tail parsing issue

* Fix missing increment in tail parser + tests

Co-authored-by: Arimah Greene <[email protected]>
2023-05-23 12:45:07 +05:30
Mahesh Bandara Wijerathna 5c9af5f3de Improve tests for key() and rekey() 2023-02-16 06:12:37 +05:30
284281afac Add key() and rekey() functions to Database which accepts password as a Buffer (#41)
Co-authored-by: Michel Verbraak <[email protected]>
2023-02-11 07:26:24 +05:30
Mahesh Bandara Wijerathna b443c19aad Increase timeout for reads and writes test
This is needed for testing in the `arm64` Qemu container.
2022-11-01 12:14:53 +05:30
Mahesh Bandara WijerathnaandRyusei Yamaguchi e99ea79d2a Fix virtual table limit offset
* Don't care limit and offset constraints of user-defined virtual tables

* Add a test case for https://github.com/WiseLibs/better-sqlite3/issues/872

Co-authored-by: Ryusei Yamaguchi <[email protected]>
2022-11-01 11:49:34 +05:30
Mahesh Bandara Wijerathna cd2d8e3e0e Add tests for in-memory database encryption 2022-07-27 13:35:31 +05:30
Joshua WiseandMahesh Bandara Wijerathna bfef6be915 fixed test
(cherry picked from commit e9ee374077329aeb09f4c3c1080d2c31b0158d74)
2022-01-19 20:21:50 +05:30
Joshua WiseandMahesh Bandara Wijerathna 928b2c582b implemented "nativeBinding" database option
(cherry picked from commit 9f6050a5620ffaaa032846e5daf558777db2a95b)
2022-01-19 20:21:49 +05:30
Joshua WiseandMahesh Bandara Wijerathna 3c5d4ac6f0 implemented statement.busy getter
(cherry picked from commit 539ff32b96213fbb033daa75303b94cbe9d95572)
2022-01-19 20:21:47 +05:30
Mahesh Bandara Wijerathna c83f0ac346 Add tests for SQLCiper encryption 2022-01-02 15:26:05 +05:30
Mahesh Bandara Wijerathna f0fb91bef7 Add test for decryption with incorrect key
It's possible now since https://github.com/utelle/SQLite3MultipleCiphers/issues/55 is fixed.
2021-11-29 15:37:33 +05:30
Mahesh Bandara WijerathnaandGitHub 3e24e7c541 Add tests for encryption (#2)
* Add `dev` branch to `push` trigger in `test` workflow

* Add encryption tests

* Fix `Assertion Failed` error in encryption tests

Other changes:
- Fix the final test to expect the correct value
2021-11-17 22:23:49 +05:30
Joshua Wise 94c7925f07 fixed bug in node 14 where empty buffers are bound as null 2021-07-19 00:13:37 -05:00
Joshua Wise 9de69cbffc updated tests 2021-07-18 21:47:44 -05:00
Joshua Wise d72777ce99 edited comment 2021-05-12 23:52:15 -05:00
Joshua Wise 189f5ba42c fixed bug in edge case 2021-05-12 23:46:33 -05:00
Joshua Wise 27f6f1779a added test 2021-05-12 21:17:05 -05:00
Joshua Wise 1bdca43e56 improved documentation, added tests, and micro-optimizations 2021-05-12 17:36:11 -05:00
Joshua Wise 6666420d3f fixed test 2021-05-11 01:39:32 -05:00
Joshua Wise 880e168b85 wrote tests for virtual tables 2021-05-11 01:05:54 -05:00
Joshua Wise b9dde13655 added directOnly option to db.aggregate() 2021-05-04 19:57:29 -05:00
Joshua Wise c5e15e001b added directOnly option to db.function() 2021-05-04 19:52:07 -05:00
Joshua Wise b7513bc7c2 implemented stmt.readonly property 2021-05-04 19:29:53 -05:00
Joshua Wise 4aca8d4dae removed HAVE_USLEEP 2021-05-04 18:56:46 -05:00
Joshua Wise d51ad4a7f1 implemented db.serialize() and deserialization 2021-05-04 18:47:20 -05:00
Joshua Wise f612f484af made timing test even more lenient 2021-05-04 02:36:42 -05:00
Joshua Wise be46b38584 made timing test more lenient 2021-05-04 02:33:39 -05:00
Joshua Wise 49b645b8ac * added support for the RETURNING clause
* statements that return data can now be executed via .run()
2021-05-04 01:06:46 -05:00
Joshua Wise acfda67fd7 fixed database subclassing 2021-04-14 17:53:42 -05:00
Joshua Wise 99d5561906 made timing test more lenient 2021-03-30 16:48:40 -05:00
Joshua Wise 1329f46982 added github sponsorship information 2020-04-25 10:20:05 -05:00
Joshua Wise cded047771 clean up worker threads in tests 2020-04-25 09:49:22 -05:00
Joshua Wise 6a1a1d50e0 added tests for unsafe mode and fixed bug 2020-04-25 09:14:52 -05:00
Joshua Wise d0a8c557c8 improved logging of db.exec() statements, and improved detection of multiple statements in db.prepare() 2020-04-23 15:01:12 -05:00
Joshua Wise a353d74f23 removed "memory" option when opening new databases 2020-04-22 18:56:14 -05:00
Joshua Wise 758650d7d6 removed db.checkpoint() method in favor of wal_checkpoint(RESTART) pragma 2020-04-22 12:05:52 -05:00
Joshua Wise a202cebc32 dropped support for node versions < 10
removed the integer library in favor of bigints
added support for worker threads
enabled SQLITE_THREADSAFE=2
replaced native Require() calls with dependency injection
2020-04-21 20:53:31 -05:00
Joshua Wise b863c87c10 updated docs 2020-01-07 14:05:18 -05:00
mrawdonandJoshua Wise dfb977d74e Window test extension (#307)
* Export test extension for Windows

* Enabled integrity extension tests

Co-authored-by: Joshua Wise <[email protected]>
2020-01-07 13:57:38 -05:00
Joshua Wise 260b4d4e0e added correct deploy key and cleaned up 2020-01-07 13:23:41 -05:00
Dan Barela 896bc22b15 Prebuild
This adds prebuild support.  When the library is released from GitHub a travis build will run which builds the library for Node 8, 10 and 12, and Electron 2 - 7
2019-10-30 11:22:49 -06:00
Joshua Thomas Wise 11a0c9d3aa ignore timeout test in windows CI 2019-08-05 11:48:59 -04:00
Joshua Thomas Wise 37283b8a18 fixed fd leaks during tests 2019-08-05 11:30:11 -04:00