Skip to content

Commit 6494184

Browse files
committed
chore: close db in bench test
1 parent e83ec8a commit 6494184

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ const brinedb = new Brine('sqlite:/path/to/database.sqlite');
4949
// Postgres
5050
const brinedb = new Brine('postgres://user:pass@localhost:5432/dbname');
5151

52-
// MariaDB
53-
const brinedb = new Brine('mariadb://user:pass@localhost:3306/dbname');
54-
55-
// MySQL
52+
// MySQL/MariaDB
5653
const brinedb = new Brine('mysql://user:pass@localhost:3306/dbname');
5754

5855
// Initialize the database (also runs migrations)
@@ -78,14 +75,16 @@ const brinedb = new Brine<Value>('sqlite::memory:');
7875

7976
await brinedb.set('key', { hello: 'world' });
8077

81-
const decoded = brinedb.get('key'); // Correctly typed
78+
const decoded = brinedb.get('key');
79+
80+
typeof decoded.hello; // string
8281
```
8382

8483
## Development
8584

8685
### Prerequisites
8786

88-
This project requires NodeJS (version 20 or later) and yarn.
87+
This project requires NodeJS (version 18 or later) and yarn.
8988
[Node](http://nodejs.org) and [Yarn](https://yarnpkg.com/) are really easy to install.
9089
To make sure you have them available on your machine,
9190
try running the following command.
@@ -119,7 +118,7 @@ inside your local `dist/` folder and output a binary in `native/`
119118

120119
## Built With
121120

122-
- [Neon](https://neon-bindings.com/)
121+
- [Napi-RS](https://napi.rs/)
123122
- [SeaORM](https://www.sea-ql.org/SeaORM/)
124123
- VSCode
125124
- TypeScript
@@ -135,4 +134,4 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
135134

136135
## License
137136

138-
[MIT License](https://dan-online.mit-license.org/2024) © DanCodes
137+
[MIT License](https://dancodes.mit-license.org/2024) © DanCodes

tests/bench.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,7 @@ describe("Benchmark", () => {
5858
await bench.run();
5959

6060
console.table(bench.table());
61+
62+
await brinedb.close();
6163
});
6264
});

0 commit comments

Comments
 (0)