# monetdb

> Connect MonetDB to your Node.js app

Latest version **2.2.0** (published 2025-06-15) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install monetdb
pnpm add monetdb
yarn add monetdb
bun add monetdb
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2025-06-15 |
| First published | 2014-10-23 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 181 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Svetlin Stalinov |
| Maintainers | rcijvat, hannes, rkoopmanschap, svetlin |
| Keywords | monetdb |

## Links

- npm: https://www.npmjs.com/package/monetdb
- Repository: https://github.com/MonetDB/monetdb-nodejs
- Homepage: https://github.com/MonetDB/monetdb-nodejs#readme
- Issues: https://github.com/MonetDB/monetdb-nodejs/issues
- npm.io page: https://npm.io/package/monetdb

## Recent versions

- 2.2.0 (latest) — 2025-06-15
- 2.1.0 — 2024-07-03
- 2.0.2 — 2023-11-04
- 2.0.1 — 2023-11-03
- 2.0.0 — 2023-11-02
- 1.3.4 — 2023-01-03
- 1.3.3 — 2020-09-08
- 1.3.2 — 2020-09-03
- 1.3.1 — 2020-04-23
- 1.3.0 — 2020-03-24
- 1.2.0 — 2020-03-16
- 1.1.5 — 2020-03-13
- 1.1.4 — 2016-09-29
- 1.1.3 — 2016-09-29
- 1.1.2 — 2016-05-13
- … 39 more at https://npm.io/package/monetdb/versions

## README

# MonetDB Node.js

![Linux](https://github.com/MonetDB/monetdb-nodejs/workflows/Linux/badge.svg)
![macOS](https://github.com/MonetDB/monetdb-nodejs/workflows/macos/badge.svg)
![MonetDB-dev-builds](https://github.com/MonetDB/monetdb-nodejs/workflows/devbuilds/badge.svg)
![npm version](https://img.shields.io/npm/v/monetdb)

Node.js connector for MonetDB.

## Getting Started

```bash
npm install monetdb
```
, connect with default options

```js
import { Connection } from monetdb

const opt: MapiConfig = {
    database: 'your_database'
}

const conn = new Connection(opt);
```
, or using mapi URL 

```js
import { Connection } from monetdb
const conn = new Connection('mapi:monetdb://<username>:<password>@<hostname>:<port>/<database>');
```
, then run some queries
```js
    const ready: boolean = await conn.connect();
    const res: QueryResult = await conn.execute('select 42');
    ...
    const closed: boolean = await conn.close();
```
, for detailed api documentation please visit [documentation](https://monetdb.github.io/monetdb-nodejs/).
## Features
- prepared statements
- streaming query results
- bulk import & export with `COPY INTO`
## Contributing

**We :heart: contributions!**

We will **happily** accept your pull request if it:

- **has tests**
- looks reasonable
- does not break backwards compatibility

If your change has breaking backwards compatibility please please point that out in the pull request. When you open an issue please provide:
- version of Node
- version of MonetDB
- smallest possible snippet of code to reproduce the problem
### Setting up for local development
- clone the repo
- run ``` npm i && npm run build``` in root folder
- have MonetDB running with `test` database. For more information on how to get started with MonetDB please visit [MonetDB Documentation](https://www.monetdb.org/documentation-Jun2023/user-guide/get-started/)
- run tests with `npm t`

---
_Source: https://npm.io/package/monetdb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
