Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: configuration profiles limitation for mysql #397

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/using-the-nodejs-wrapper/ConfigurationPresets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

A Configuration Preset is a [configuration profile](./UsingTheNodejsWrapper.md#configuration-profiles) that has already been set up by the AWS Advanced NodeJS Wrapper team. Preset configuration profiles are optimized, profiled, verified and can be used right away. If the existing presets do not cover an exact use case, users can also create their own configuration profiles based on the built-in presets.

> [!WARNING]
> Configuration profiles can only be used to connect to PostgreSQL sources. An error will be thrown when attempting a connection to a MySQL source.

## Using Configuration Presets

The Configuration Preset name should be specified with the [`profileName`](./UsingTheNodejsWrapper.md#connection-plugin-manager-parameters) parameter.

```typescript
const client = new AwsMySQLClient({
const client = new AwsPGClient({
...
profileName: "A2"
});
Expand All @@ -27,7 +30,7 @@ ConfigurationProfileBuilder.get()
.withDatabaseDialect(new CustomDatabaseDialect())
.buildAndSet();

const client = new AwsMySQLClient({
const client = new AwsPGClient({
...
profileName: "myNewProfile"
});
Expand Down
5 changes: 4 additions & 1 deletion docs/using-the-nodejs-wrapper/UsingTheNodejsWrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ For more information, see [Custom Plugins](../development-guide/LoadablePlugins.

### Configuration Profiles

> [!WARNING]
> Configuration profiles can only be used to connect to PostgreSQL sources. An error will be thrown when attempting a connection to a MySQL source.

An alternative way of loading plugins and providing configuration parameters is to use a configuration profile. You can create custom configuration profiles that specify which plugins the AWS Advanced NodeJS Wrapper should load. After creating the profile, set the [`profileName`](#connection-plugin-manager-parameters) parameter to the name of the created profile.
This method of loading plugins will most often be used by those who require custom plugins that cannot be loaded with the [`plugins`](#connection-plugin-manager-parameters) parameter, or by those who are using preset configurations.

Expand All @@ -159,7 +162,7 @@ ConfigurationProfileBuilder.get()
.buildAndSet();

// Use the configuration profile "testProfile"
const client = new AwsMySQLClient({
const client = new AwsPGClient({
user: "user",
password: "password",
host: "host",
Expand Down