1 Star 0 Fork 1

光魔科技/vertx-examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.adoc 2.29 KB
一键复制 编辑 原始数据 按行查看 历史

Vert.x JDBC Client examples

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

Simple

This example shows the basic functionality of the JDBC 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:

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/3kgz/vertx-examples.git
git@gitee.com:3kgz/vertx-examples.git
3kgz
vertx-examples
vertx-examples
master

搜索帮助