Skip to content

Commit 43f35ea

Browse files
committed
Adding tabs
1 parent b0378e9 commit 43f35ea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

articles/cosmos-db/cassandra-change-feed.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The following example shows how to get a change feed on all the rows in a Cassan
1818
In each iteration, the query resumes at the last point changes were read, using paging state. We can see a continuous stream of new changes to the table in the Keyspace. We will see changes to rows that are inserted, or updated. Watching for delete operations using change feed in Cassandra API is currently not supported.
1919

2020
# [C#](#tab/c#)
21+
2122
```C#
2223
//set initial start time for pulling the change feed
2324
DateTime timeBegin = DateTime.UtcNow;
@@ -66,7 +67,9 @@ In each iteration, the query resumes at the last point changes were read, using
6667
}
6768

6869
```
70+
6971
# [Java](#tab/java)
72+
7073
```java
7174
Session cassandraSession = utils.getSession();
7275

@@ -106,6 +109,7 @@ In each iteration, the query resumes at the last point changes were read, using
106109
In order to get the changes to a single row by primary key, you can add the primary key in the query. The following example shows how to track changes for the row where "user_id = 1"
107110

108111
# [C#](#tab/c#)
112+
109113
```C#
110114
//Return the latest change for all row in 'user' table where user_id = 1
111115
IStatement changeFeedQueryStatement = new SimpleStatement(
@@ -114,6 +118,7 @@ In order to get the changes to a single row by primary key, you can add the prim
114118
```
115119

116120
# [Java](#tab/java)
121+
117122
```java
118123
String query="SELECT * FROM uprofile.user where user_id=1 and COSMOS_CHANGEFEED_START_TIME()='"
119124
+ dtf.format(now)+ "'";

0 commit comments

Comments
 (0)