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 excellent data-api-client module.
Support for transactions, and nestTables is included.
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"
}
});
Note - this significantly increases the data required back from the RDS data api.
knex()
.doSomething()
.options({ nestTables: true });
Forked from Skyhook knex-data-api-client and provided under an MIT license.