1 Star 0 Fork 2

nie/vertx-examples

forked from githubsync/vertx-examples 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
README.adoc 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
Julien Viet 提交于 2020-12-02 22:48 +08:00 . SQL templates examples

Vert.x SQL Client examples

Here you will find examples demonstrating the usage of the Vert.x SQL Client (aka Reactive 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.

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.

Streaming

This is a follow up to the Simple example. In this example you will see how to read results as a stream instead of fetching them all in memory. This is particularly useful when you expect large results.

Transaction

The Transaction example show how to execute queries with a transaction using the asynchronous SQL client.

Transaction Rollback

The Transaction rollback example is a modified version of the simple Transaction example. In this example, we manage the transaction manually and, after inserting data, we rollback the changes. The result should be an empty list.

Template

The Template example show how to execute SQL templates.

Template mapping

The Template mapping example show how to execute SQL templates mapped to query params or database rows

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

搜索帮助