1.10.0 • Published 2 years ago

knex-aurora-data-api-client v1.10.0

Weekly downloads
1,162
License
MIT
Repository
github
Last release
2 years ago

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.

1.10.0

2 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.5

3 years ago

1.6.4

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago