You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/using-the-jdbc-driver/DataSource.md
+19-21Lines changed: 19 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,16 @@ you need to specify what property names the underlying datasource uses.
16
16
For example, one datasource implementation could use the method `setUser` to set the datasource username,
17
17
while another might use the method `setUsername` for the same task. See the table below for a list of configurable property names.
18
18
19
-
> **:warning: Note:** If the same connection property is provided both explicitly in the connection URL and in the datasource properties, the value set in the connection URL will take precedence.
20
-
21
-
| Property | Configuration Method | Description | Type | Required | Example |
| Server name |`setServerPropertyName`| The name of the server or host property. |`String`| Yes, if no URL is provided. |`serverName`|
24
-
| Database name |`setDatabasePropertyName`| The name of the database property. |`String`| No |`databaseName`|
25
-
| Port name |`setPortPropertyName`| The name of the port property. |`String`| No |`port`|
26
-
| URL name |`setUrlPropertyName`| The name of the URL property. |`String`| No, but some drivers, such as MariaDb, require some parameters to be included in the URL so it is recommended to provide this parameter. |`url`|
27
-
| JDBC URL |`setJdbcUrl`| The URL to connect with. |`String`| No, if there is enough information provided by the other properties that can be used to create a URL. |`jdbc:postgresql://localhost/postgres`|
28
-
| JDBC protocol |`setJdbcProtocol`| The JDBC protocol that will be used. |`String`| Yes, if the JDBC URL has not been set. |`jdbc:postgresql:`|
29
-
| Underlying DataSource class |`setTargetDataSourceClassName`| The fully qualified class name of the underlying DataSource class the AWS JDBC Driver should use. |`String`| Yes, if the JDBC URL has not been set. |`org.postgresql.ds.PGSimpleDataSource`|
19
+
> **:warning: Note:** If the same connection property is provided both explicitly in the connection URL and in the datasource properties, the value set in the datasource properties will take precedence.
20
+
21
+
| Property | Configuration Method | Description | Type | Required | Example |
| Server name |`setServerName`| The name of the server. |`String`| Yes, if no URL is provided. |`db-server.mydomain.com`|
24
+
| Server port |`setServerPort`| The server port. |`String`| No |`5432`|
25
+
| Database name |`setDatabase`| The name of the database. |`String`| No |`testDatabase`|
26
+
| JDBC URL |`setJdbcUrl`| The URL to connect with. |`String`| No. Either URL or server name should be set. If both URL and server name have been set, URL will take precedence. Please note that some drivers, such as MariaDb, require some parameters to be included particularly in the URL. |`jdbc:postgresql://localhost/postgres`|
27
+
| JDBC protocol |`setJdbcProtocol`| The JDBC protocol that will be used. |`String`| Yes, if the JDBC URL has not been set. |`jdbc:postgresql:`|
28
+
| Underlying DataSource class |`setTargetDataSourceClassName`| The fully qualified class name of the underlying DataSource class the AWS JDBC Driver should use. |`String`| Yes, if the JDBC URL has not been set. |`org.postgresql.ds.PGSimpleDataSource`|
30
29
31
30
## Using the AwsWrapperDataSource with Connection Pooling Frameworks
32
31
@@ -63,21 +62,20 @@ To use the AWS JDBC Driver with a connection pool, you must:
63
62
```java
64
63
// Note: jdbcProtocol is required when connecting via server name
0 commit comments