Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added subcols count

  • Loading branch information...
commit 1aa93e78257e86dfc73390cb9c4db52d8ed29a69 1 parent bafe62b
zznate authored
View
19 core/src/test/java/me/prettyprint/cassandra/service/template/SuperCfTemplateTest.java
@@ -176,6 +176,25 @@ public void testDeleteSubColumns() {
}
@Test
+ public void testCountSubColumns() {
+ SuperCfTemplate<String, String, String> sTemplate =
+ new ThriftSuperCfTemplate<String, String, String>(keyspace, "Super1", se, se, se);
+ SuperCfUpdater sUpdater = sTemplate.createUpdater("skey3","super1");
+ for (int i = 0; i < 500; i++) {
+ sUpdater.setString("sub1_col_"+i, "sub1_val_"+i);
+ }
+
+ sTemplate.update(sUpdater);
+
+ int countVal = sTemplate.countSubColumns("skey3", "super1");
+
+ SuperCfResult<String,String,String> result = sTemplate.querySuperColumn("skey3","super1");
+ assertEquals(countVal, result.getColumnNames().size());
+
+
+ }
+
+ @Test
public void testTemplateLevelDeleteSuper() {
SuperCfTemplate<String, String, String> sTemplate =
new ThriftSuperCfTemplate<String, String, String>(keyspace, "Super1", se, se, se);
Please sign in to comment.
Something went wrong with that request. Please try again.