This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 68e4308 Add SQL example
68e4308 is described below
commit 68e4308f1232413f0bd4d55f802b9533da5ea28b
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Jun 1 11:09:22 2024 +0200
Add SQL example
---
jbang/sql/README.adoc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/jbang/sql/README.adoc b/jbang/sql/README.adoc
index 2a0842e..6cc832f 100644
--- a/jbang/sql/README.adoc
+++ b/jbang/sql/README.adoc
@@ -71,6 +71,20 @@ And you should see the 3rd user being logged by Camel.
NOTE: To use `camel cmd send` then this requires to have
`application.properties` included
if you run the kamelet example.
+You can also execute SQL queries and show the result (via `--reply`) in the
terminal as shown:
+
+[source,sh]
+----
+$ camel cmd send --endpoint='sql:select count(*) from users' --body=empty
--reply
+
+2024-06-01 11:08:06.638 74641 --- sql://select%20count(*)%20from%20users :
Reply received (success) (8ms)
+ Endpoint sql://select%20count(*)%20from%20users
+ Exchange (DefaultExchange) InOut 6951487A32B32F3-00000000000001A1
+ Message (DefaultMessage)
+ Header (Integer) CamelSqlRowCount 1
+ Body (ArrayList) (size: 1 bytes: 11)
+ [{count=3}]
+----
=== Help and contributions