Java Code Examples for com.datastax.driver.core.DataType#ascii()

The following examples show how to use com.datastax.driver.core.DataType#ascii() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CassandraTypeConverterTest.java    From debezium-incubator with Apache License 2.0 5 votes vote down vote up
@Test
public void testAscii() {
    DataType asciiType = DataType.ascii();
    AbstractType<?> convertedType = CassandraTypeConverter.convert(asciiType);

    AsciiType expectedType = AsciiType.instance;

    Assert.assertEquals(expectedType, convertedType);
}
 
Example 2
Source File: DatastaxMapperKeyComparatorTest.java    From SimpleFlatMapper with MIT License 5 votes vote down vote up
private DataType getDataType() {
    int i = random.nextInt(3);

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