diff --git a/README.md b/README.md index 985e133c..c9027e6e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Follow one of the following ways to add the corresponding database JAR in the fi ### Client To access a database, you must first create a -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) object. +[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) object. The samples for creating a JDBC client can be found below. > **Tip**: The client should be used throughout the application lifetime. @@ -60,9 +60,9 @@ jdbc:Client|sql:Error dbClient = new ( ``` In the sample below, the `jdbc:Client` uses the named parameters to pass all the attributes and provides the `options` property in the type of -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options), +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options), and also uses the unshared connection pool in the type of -[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). For more information about connection pooling, see the [`sql` library](https://docs.central.ballerina.io/ballerina/sql/latest). E.g., The DB client creation for an H2 database will be as follows. @@ -80,7 +80,7 @@ jdbc:Client|sql:Error dbClient = new ( ``` The `jdbc:Client` receives some custom properties within the -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options) +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options) and those properties will be used by the defined `datasourceName`. As per the provided sample, the `org.h2.jdbcx.JdbcDataSource` datasource will be configured with a `loginTimeout` of `2000` milliseconds. @@ -98,16 +98,16 @@ jdbc:Client|sql:Error dbClient = new ( ``` You can find more details about each property in the -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) constructor. +[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) constructor. -The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) references -[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest/clients/Client) and +The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) references +[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest#Client) and all the operations defined by the `sql:Client` will be supported by the `jdbc:Client` as well. #### Handle connection pools All database libraries share the same connection pooling concept and there are three possible scenarios for -connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). >**Note**: Connection pooling is used to optimize opening and closing connections to the database. However, the pool comes with an overhead. It is best to configure the connection pool properties as per the application need to get the best performance. @@ -547,6 +547,6 @@ All contributors are encouraged to read the [Ballerina code of conduct](https:// ## Useful links * For more information go to the [`JDBC` library](https://lib.ballerina.io/ballerinax/java.jdbc/latest). -* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/jdbc-query-operation.html). +* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/#database-access). * Chat live with us via our [Discord server](https://discord.gg/ballerinalang). * Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. diff --git a/ballerina/Module.md b/ballerina/Module.md index caa8c430..5a35a65b 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -25,7 +25,7 @@ Follow one of the following ways to add the corresponding database JAR in the fi ### Client To access a database, you must first create a -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) object. +[`jdbc:Client`](https://central.ballerina.io/ballerinax/java.jdbc/latest#Client) object. The samples for creating a JDBC client can be found below. > **Tip**: The client should be used throughout the application lifetime. @@ -53,9 +53,9 @@ jdbc:Client|sql:Error dbClient = new ( ``` In the sample below, the `jdbc:Client` uses the named parameters to pass all the attributes and provides the `options` property in the type of -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options), +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options), and also uses the unshared connection pool in the type of -[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). For more information about connection pooling, see the [`sql` module](https://docs.central.ballerina.io/ballerina/sql/latest). E.g., The DB client creation for an H2 database will be as follows. @@ -73,7 +73,7 @@ jdbc:Client|sql:Error dbClient = new ( ``` The `jdbc:Client` receives some custom properties within the -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options) +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options) and those properties will be used by the defined `datasourceName`. As per the provided sample, the `org.h2.jdbcx.JdbcDataSource` datasource will be configured with a `loginTimeout` of `2000` milliseconds. @@ -91,16 +91,16 @@ jdbc:Client|sql:Error dbClient = new ( ``` You can find more details about each property in the -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) constructor. +[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) constructor. -The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) references -[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest/clients/Client) and +The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) references +[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest#Client) and all the operations defined by the `sql:Client` will be supported by the `jdbc:Client` as well. #### Handle connection pools All database modules share the same connection pooling concept and there are three possible scenarios for -connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). >**Note**: Connection pooling is used to optimize opening and closing connections to the database. However, the pool comes with an overhead. It is best to configure the connection pool properties as per the application need to get the best performance. diff --git a/ballerina/Package.md b/ballerina/Package.md index 400fc393..01990eb0 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -25,7 +25,7 @@ Follow one of the following ways to add the corresponding database JAR in the fi ### Client To access a database, you must first create a -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) object. +[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) object. The samples for creating a JDBC client can be found below. > **Tip**: The client should be used throughout the application lifetime. @@ -53,9 +53,9 @@ jdbc:Client|sql:Error dbClient = new ( ``` In the sample below, the `jdbc:Client` uses the named parameters to pass all the attributes and provides the `options` property in the type of -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options), +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options), and also uses the unshared connection pool in the type of -[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +[`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). For more information about connection pooling, see the [`sql` package](https://docs.central.ballerina.io/ballerina/sql/latest). E.g., The DB client creation for an H2 database will be as follows. @@ -73,7 +73,7 @@ jdbc:Client|sql:Error dbClient = new ( ``` The `jdbc:Client` receives some custom properties within the -[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/records/Options) +[`jdbc:Options`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Options) and those properties will be used by the defined `datasourceName`. As per the provided sample, the `org.h2.jdbcx.JdbcDataSource` datasource will be configured with a `loginTimeout` of `2000` milliseconds. @@ -91,16 +91,16 @@ jdbc:Client|sql:Error dbClient = new ( ``` You can find more details about each property in the -[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) constructor. +[`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) constructor. -The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest/clients/Client) references -[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest/clients/Client) and +The [`jdbc:Client`](https://docs.central.ballerina.io/ballerinax/java.jdbc/latest#Client) references +[`sql:Client`](https://docs.central.ballerina.io/ballerina/sql/latest#Client) and all the operations defined by the `sql:Client` will be supported by the `jdbc:Client` as well. #### Handle connection pools All database packages share the same connection pooling concept and there are three possible scenarios for -connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest/records/ConnectionPool). +connection pool handling. For its properties and possible values, see the [`sql:ConnectionPool`](https://docs.central.ballerina.io/ballerina/sql/latest#ConnectionPool). >**Note**: Connection pooling is used to optimize opening and closing connections to the database. However, the pool comes with an overhead. It is best to configure the connection pool properties as per the application need to get the best performance.