Using a Ballerina table as a proxy to an actual database table

In Ballerina language there is a type called table. Table type is analogous to a database table. One use case of these tables is acting as a proxy for an actual database table. This is an operation available in Ballerina generic jdbc client and other database specific jdbc clients such as mysql and h2 clients.

The operation is getProxyTable.

So let’s write a Ballerina program that creates a “proxy” table for an actual database table, inserts some data to it and iterates the database table through the Ballerina table!

Here goes the program.