Socket
Socket
Sign inDemoInstall

knex-aurora-data-api-client

Package Overview
Dependencies
29
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    knex-aurora-data-api-client

Knex Aurora Data API Client


Version published
Weekly downloads
2.9K
increased by0.83%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

knex-aurora-data-api-client

Knex Aurora Data API Client

npm npm

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 excellent 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 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:

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:

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.

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

Credits

Forked from Skyhook knex-data-api-client and provided under an MIT license.

Keywords

FAQs

Last updated on 05 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc