Skip to content
Branch: master
Find file History
Latest commit de9ab5f Aug 21, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src/main Remove wrong examples in sql client examples Jul 18, 2019
README.adoc Improve SQL client examples Jul 18, 2019
codetrans-config.json Improve SQL client examples Jul 18, 2019
pom.xml Upgrade to 3.8.1 Aug 21, 2019

README.adoc

Vert.x SQL Client examples

Here you will find examples demonstrating the usage of the Vert.x SQL Client.

Simple

This example shows the basic functionality of the SQL client, it demonstrates how to connect to a database, perform basic data definition queries by creating a test table plus test data, after it shows how to perform simple queries without parameters and shows how to close the connection.

The example is available in several languages:

Query Params

This is a follow up to the Simple example. In this example you will see how to write queries with parameters, the advantage of doing so is to avoid common SQL injection security issues since all parameters are used in a PreparedStatement before being sent to the database engine.

The example is available in several languages:

Transaction

The Transaction example show how to start and finish a transaction using the asynchronous jdbc client. Note that the expected result is 1 since the example is counting the number of inserted rows after a the end of the transaction.

The example is only available in Java:

Transaction Rollback

The Transaction rollback example is a modified version of the simple Transaction example. In this example after inserting data we rollback the transaction and the final count show that we have 0 rows in our table.

The example is only available in Java:

You can’t perform that action at this time.