Package org.springframework.cassandra.core.keyspace

Examples of org.springframework.cassandra.core.keyspace.ColumnSpecification


    return null;
  }

  public static void assertColumns(List<ColumnSpecification> expected, List<ColumnMetadata> actual) {
    for (int i = 0; i < expected.size(); i++) {
      ColumnSpecification expectedColumn = expected.get(i);
      ColumnMetadata actualColumn = actual.get(i);

      assertColumn(expectedColumn, actualColumn);
    }
  }
View Full Code Here


    CreateTableSpecification spec = context.getCreateTableSpecificationFor(thing);

    List<ColumnSpecification> partitionKeyColumns = spec.getPartitionKeyColumns();
    assertEquals(1, partitionKeyColumns.size());
    ColumnSpecification partitionKeyColumn = partitionKeyColumns.get(0);
    assertEquals("z", partitionKeyColumn.getName().toCql());
    assertEquals(PrimaryKeyType.PARTITIONED, partitionKeyColumn.getKeyType());
    assertEquals(DataType.text(), partitionKeyColumn.getType());

    List<ColumnSpecification> clusteredKeyColumns = spec.getClusteredKeyColumns();
    assertEquals(1, clusteredKeyColumns.size());
    ColumnSpecification clusteredKeyColumn = clusteredKeyColumns.get(0);
    assertEquals("a", clusteredKeyColumn.getName().toCql());
    assertEquals(PrimaryKeyType.CLUSTERED, clusteredKeyColumn.getKeyType());
    assertEquals(DataType.text(), partitionKeyColumn.getType());
  }
View Full Code Here

TOP

Related Classes of org.springframework.cassandra.core.keyspace.ColumnSpecification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.