You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/06/13 09:02:17 UTC

[camel] branch master updated: Added example to CassandraQL doc

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 0fb05e4  Added example to CassandraQL doc
0fb05e4 is described below

commit 0fb05e4e0d25781960c382cc188fb0b08557255d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jun 13 11:00:27 2018 +0200

    Added example to CassandraQL doc
---
 .../src/main/docs/cql-component.adoc               | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/components/camel-cassandraql/src/main/docs/cql-component.adoc b/components/camel-cassandraql/src/main/docs/cql-component.adoc
index 9a0b8a1..687d9e4 100644
--- a/components/camel-cassandraql/src/main/docs/cql-component.adoc
+++ b/components/camel-cassandraql/src/main/docs/cql-component.adoc
@@ -245,3 +245,25 @@ Alternatively, the `CassandraAggregationRepository` does not have a
 |`readConsistencyLevel` |  | Consistency level used to read/check exchange: `ONE`, `TWO`, `QUORUM`,
 `LOCAL_QUORUM`…
 |=======================================================================
+
+=== Examples
+
+To insert something on a table you can use the following code:
+
+[source,java]
+---------------------------------------------------------
+String CQL = "insert into camel_user(login, first_name, last_name) values (?, ?, ?)";
+from("direct:input")
+    .to("cql://localhost/camel_ks?cql=" + CQL);
+---------------------------------------------------------
+
+At this point you should be able to insert data by using a list as body
+
+[source,java]
+---------------------------------------------------------
+Arrays.asList("davsclaus", "Claus", "Ibsen")
+---------------------------------------------------------
+
+The same approach can be used for updating or querying the table.
+
+

-- 
To stop receiving notification emails like this one, please contact
acosentino@apache.org.