Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:rantav/hector into 0.8.0

  • Loading branch information...
commit b7317cf4c053744adc2255e540954f9f6873c474 2 parents 69bfe8d + 6d57981
zznate authored
View
14 core/src/main/java/me/prettyprint/cassandra/testutils/EmbeddedSchemaLoader.java
@@ -66,8 +66,8 @@ public static void loadSchema() {
// Column Families
standardCFMD(ks1, "Standard1"), standardCFMD(ks1, "Standard2"),
standardCFMD(ks1, "Standard3"), standardCFMD(ks1, "Standard4"),
- standardCFMD(ks1, "StandardLong1").keyValidator(UTF8Type.instance),
- standardCFMD(ks1, "StandardLong2"),
+ cqlTestCf(ks1, "StandardLong1",UTF8Type.instance),
+ standardCFMD(ks1, "StandardLong2").keyValidator(UTF8Type.instance),
superCFMD(ks1, "Super1", BytesType.instance),
superCFMD(ks1, "Super2", LongType.instance),
superCFMD(ks1, "Super3", LongType.instance),
@@ -117,5 +117,15 @@ private static CFMetaData jdbcCFMD(String ksName, String cfName,
return new CFMetaData(ksName, cfName, ColumnFamilyType.Standard, comp, null)
.defaultValidator(comp);
}
+
+ private static CFMetaData cqlTestCf(String ksName, String cfName,
+ AbstractType comp) {
+ return new CFMetaData(ksName, cfName, ColumnFamilyType.Standard, comp, null)
+ .keyValidator(UTF8Type.instance).columnMetadata(new HashMap<ByteBuffer, ColumnDefinition>()
+ {{
+ ByteBuffer cName = ByteBuffer.wrap("birthyear".getBytes(Charsets.UTF_8));
+ put(cName, new ColumnDefinition(cName, LongType.instance, null, null));
+ }});
+ }
}
View
6 core/src/test/java/me/prettyprint/cassandra/model/CqlQueryTest.java
@@ -70,4 +70,10 @@ public void testSyntaxFailQuery() {
}
+ @Test
+ public void testInsertSyntax() {
+ CqlQuery<String,String,Long> cqlQuery = new CqlQuery<String,String,Long>(keyspace, se, se, le);
+ cqlQuery.setQuery("update StandardLong1 set 'birthyear' = '1976' WHERE KEY = 'cqlQueryTest_key7'");
+ QueryResult<CqlRows<String,String,Long>> result = cqlQuery.execute();
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.