diff --git a/examples/atomic-batch-operation/Performing Atomic Batch Operations with PostgreSQL.md b/examples/atomic-batch-operation/Performing Atomic Batch Operations with PostgreSQL.md index 8b1781e2..e6309194 100644 --- a/examples/atomic-batch-operation/Performing Atomic Batch Operations with PostgreSQL.md +++ b/examples/atomic-batch-operation/Performing Atomic Batch Operations with PostgreSQL.md @@ -6,29 +6,14 @@ The `atomic-batch-operation` project demonstrates how to use the PostgreSQL clie * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file # Run the example To run the example, move into the `atomic-batch-operation` project and execute the below command. -``` -$bal run +```shell +bal run ``` It will build the `atomic-batch-operation` Ballerina project and then run it. @@ -36,7 +21,7 @@ It will build the `atomic-batch-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell [ballerina/http] started HTTP/WS listener 192.168.1.10:55471 Error while executing batch command starting with: 'INSERT INTO Students (firstName, lastName, registrationID, creditLimit, country) diff --git a/examples/batch-operation/Performing Batch Operations with PostgreSQL.md b/examples/batch-operation/Performing Batch Operations with PostgreSQL.md index e80929a5..68d328bb 100644 --- a/examples/batch-operation/Performing Batch Operations with PostgreSQL.md +++ b/examples/batch-operation/Performing Batch Operations with PostgreSQL.md @@ -6,28 +6,14 @@ The `batch-operation` project demonstrates how to use the PostgreSQL client to e * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file + # Run the example To run the example, move into the `batch-operation` project and execute the below command. -``` -$bal run +```shell +bal run ``` It will build the `batch-operation` Ballerina project and then run it. @@ -35,7 +21,7 @@ It will build the `batch-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell Insert success, generated IDs are: [1,2,3] Data in Customers table: diff --git a/examples/call-stored-procedures/Calling Stored Procedures with PostgreSQL.md b/examples/call-stored-procedures/Calling Stored Procedures with PostgreSQL.md index ca49d6f8..6c121d65 100644 --- a/examples/call-stored-procedures/Calling Stored Procedures with PostgreSQL.md +++ b/examples/call-stored-procedures/Calling Stored Procedures with PostgreSQL.md @@ -6,28 +6,14 @@ The `call-stored-operation` project demonstrates how to use the PostgreSQL clien * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file + # Run the example To run the example, move into the `call-stored-operation` project and execute the below command. -``` -$bal run +```shell +bal run ``` It will build the `call-stored-operation` Ballerina project and then run it. @@ -35,7 +21,7 @@ It will build the `call-stored-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell Call stored procedure `InsertStudent`. Inserted data: {"id":1,"age":24,"name":"George"} Call stored procedure `GetCount`. diff --git a/examples/complex-queries-operation/Performing Complex Queries with PostgreSQL.md b/examples/complex-queries-operation/Performing Complex Queries with PostgreSQL.md index 438df85a..228fff9b 100644 --- a/examples/complex-queries-operation/Performing Complex Queries with PostgreSQL.md +++ b/examples/complex-queries-operation/Performing Complex Queries with PostgreSQL.md @@ -6,27 +6,14 @@ This example demonstrates how to use the PostgreSQL client with complex data typ * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file + # Run the example To run the example, move into the `complex-queries-operation` project and execute the below command. -``` -$bal run + +```shell +bal run ``` It will build the `complex-queries-operation` Ballerina project and then run it. @@ -34,7 +21,7 @@ It will build the `complex-queries-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell Json types Result : {"row_id":1,"json_type":{"key1":"value","key2":2},"jsonb_type":{"key1":"value","key2":2},"jsonpath_type":"$."floor"[*]."apt"[*]?(@."area" > 40 && @."area" < 90)?(@."rooms" > 1)"} Range type Result : diff --git a/examples/execute-operation/Executing Queries with PostgreSQL.md b/examples/execute-operation/Executing Queries with PostgreSQL.md index c8e22cee..1dddeab2 100644 --- a/examples/execute-operation/Executing Queries with PostgreSQL.md +++ b/examples/execute-operation/Executing Queries with PostgreSQL.md @@ -6,28 +6,14 @@ This example demonstrates how to use the PostgreSQL client with the DDL and DML * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file + # Run the example To run the example, move into the `execute-batch-operation` project and execute the below command. -``` -$bal run +```shell +bal run ``` It will build the `execute-operation` Ballerina project and then run it. @@ -35,7 +21,7 @@ It will build the `execute-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell Rows affected: 1 Generated Customer ID: 2 Updated Row count: 1 diff --git a/examples/query-operation/Performing Queries with PostgreSQL.md b/examples/query-operation/Performing Queries with PostgreSQL.md index 4c6857c8..d57805b2 100644 --- a/examples/query-operation/Performing Queries with PostgreSQL.md +++ b/examples/query-operation/Performing Queries with PostgreSQL.md @@ -6,28 +6,14 @@ This example demonstrates how to use the PostgreSQL client select query operatio * Install the PostgreSQL server and create a database -* Add required configurations in the `config.toml` file - -* Follow one of the following ways to add PostgreSQL database driver JAR in the `Ballerina.toml` file: - * Download the JAR and update the path - ``` - [[platform.java17.dependency]] - path = "PATH" - ``` - - * Replace the above path with a maven dependency param - ``` - [platform.java17.dependency]] - groupId = "org.postgresql" - artifactId = "postgresql" - version = "42.2.20" - ``` +* Add required configurations in the `Config.toml` file + # Run the example To run the example, move into the `query-operation` project and execute the below command. -``` -$bal run +```shell +bal run ``` It will build the `query-operation` Ballerina project and then run it. @@ -35,7 +21,7 @@ It will build the `query-operation` Ballerina project and then run it. This gives the following output when running this project. -```ballerina +```shell Full Customer details: {"customerid":1,"firstname":"Peter","lastname":"Stuart","registrationid":1,"creditlimit":5000.75,"country":"USA"} Full Customer details: {"customerid":2,"firstname":"Dan","lastname":"Brown","registrationid":2,"creditlimit":10000.0,"country":"UK"} Total rows in customer table : 2