Skip to content

Commit

Permalink
docs: configuration profiles limitation for mysql (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-bq authored Feb 6, 2025
1 parent 98fcda0 commit 09f4931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit 09f4931

Please sign in to comment.