Here you will find examples demonstrating the usage of the Vert.x JDBC Client.
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:
Java: JDBCExample.java
JavaScript: jdbc_example.js
Groovy: jdbc_example.groovy
Ruby: jdbc_example.rb
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:
Java: JDBCExample.java
JavaScript: jdbc_example.js
Groovy: jdbc_example.groovy
Ruby: jdbc_example.rb
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:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。