# knex-aurora-data-api-client

> Knex Aurora Data API Client

Latest version **1.10.0** (published 2023-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install knex-aurora-data-api-client
pnpm add knex-aurora-data-api-client
yarn add knex-aurora-data-api-client
bun add knex-aurora-data-api-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.10.0 |
| Published | 2023-04-05 |
| First published | 2019-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Markus Ahlstrand |
| Maintainers | markusahlstrand |
| Keywords | knex, data, api, rds, aurora, serverless, mysql, postgres |

## Links

- npm: https://www.npmjs.com/package/knex-aurora-data-api-client
- Repository: https://github.com/markusahlstrand/knex-data-api-client
- Homepage: https://github.com/markusahlstrand/knex-data-api-client#readme
- Issues: https://github.com/markusahlstrand/knex-aurora-data-api-client/issues
- npm.io page: https://npm.io/package/knex-aurora-data-api-client

## Dependencies (2)

- [bluebird](https://npm.io/package/bluebird.md) 3.7.2
- [data-api-client](https://npm.io/package/data-api-client.md) 1.2.0

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 1.10.0 (latest) — 2023-04-05
- 1.9.0 — 2022-06-24
- 1.8.0 — 2022-05-26
- 1.7.0 — 2022-02-19
- 1.6.5 — 2021-11-15
- 1.6.4 — 2021-10-13
- 1.6.3 — 2021-10-06
- 1.6.2 — 2021-09-23
- 1.6.1 — 2021-08-27
- 1.6.0 — 2021-06-30
- 1.5.5 — 2021-06-02
- 1.5.4 — 2021-04-16
- 1.5.3 — 2021-04-09
- 1.5.2 — 2021-02-12
- 1.5.1 — 2021-02-12
- … 21 more at https://npm.io/package/knex-aurora-data-api-client/versions

## README

# knex-aurora-data-api-client

Knex Aurora Data API Client

[![npm](https://img.shields.io/npm/v/knex-aurora-data-api-client.svg)](https://www.npmjs.com/package/knex-aurora-data-api-client)
[![npm](https://img.shields.io/npm/l/knex-aurora-data-api-client.svg)](https://www.npmjs.com/package/knex-aurora-data-api-client)

This is a fork of the knex-data-api-client by @alan-cooney to support both Postgres and Mysql

The **Knex Aurora Data API Client** is a Knex extension that supports the RDS Data API, built using [Jeremy Daily's](https://twitter.com/jeremy_daly) excellent [data-api-client](https://www.npmjs.com/package/data-api-client) module.

Support for transactions, and nestTables is included.

## Configuration

The library uses the default AWS credentials to connect to the RDS database using the data-api.
The [data-api-client](https://www.npmjs.com/package/data-api-client) that this library is a using provides more documentation on the permissions required and how to enable the data-api for the database.

## Use

To use aurora in mysql mode:

```javascript
const knexDataApiClient = require('knex-aurora-data-api-client');
const knex = require('knex')({
  client: knexDataApiClient.mysql,
  connection: {
    secretArn: 'secret-arn', // Required
    resourceArn: 'db-resource-arn', // Required
    database: 'db-name',
    region: 'eu-west-2',
  },
});
```

To use aurora in postgres mode:

```javascript
const knexDataApiClient = require('knex-aurora-data-api-client');
const knex = require('knex')({
  client: knexDataApiClient.postgres,
  connection: {
    secretArn: 'secret-arn', // Required
    resourceArn: 'db-resource-arn', // Required
    database: 'db-name',
    region: 'eu-west-2',
  },
});
```

### Nested tables support

Note - this significantly increases the data required back from the RDS data api.

```javascript
knex().doSomething().options({ nestTables: true });
```

## Credits

Forked from [Skyhook](https://www.skyhookadventure.com) [knex-data-api-client](https://github.com/alan-cooney/knex-data-api-client) and provided under an MIT license.

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