com.datastax.driver.core.DataType#ascii ( )源码实例Demo

下面列出了com.datastax.driver.core.DataType#ascii ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@Test
public void testAscii() {
    DataType asciiType = DataType.ascii();
    AbstractType<?> convertedType = CassandraTypeConverter.convert(asciiType);

    AsciiType expectedType = AsciiType.instance;

    Assert.assertEquals(expectedType, convertedType);
}
 
private DataType getDataType() {
    int i = random.nextInt(3);

    switch (i) {
        case 0: return DataType.ascii();
        case 1: return DataType.bigint();
    }
    return null;
}