Package org.cyclop.model

Examples of org.cyclop.model.CqlRowMetadata


        Label columnNameLabel = new Label("columnName", columnName.part);
        columnListRow.add(columnNameLabel);

        ColumnsModel model = (ColumnsModel) getModel();
        CqlRowMetadata result = model.getResult();
        final CqlPartitionKey partitionKey = result == null ? null : result.partitionKey;

        ListView<Row> columnValueList = new ListView<Row>("columnValueList", rowsModel) {

          @Override
View Full Code Here


      return CqlQueryResult.EMPTY;
    }

    Map<String, CqlColumnType> typeMap = createTypeMap(query);
    Row firstRow = cqlResult.one();
    CqlRowMetadata rowMetadata = extractRowMetadata(firstRow, typeMap);

    RowIterator rowIterator = new RowIterator(cqlResult.iterator(), firstRow);
    CqlQueryResult result = new CqlQueryResult(rowIterator, rowMetadata);
    return result;
  }
View Full Code Here

        partitionKey = CqlPartitionKey.fromColumn(columnName);
      }
      columnsBuild.add(columnName);
    }

    CqlRowMetadata metadata = new CqlRowMetadata(columnsBuild.build(), partitionKey);
    return metadata;
  }
View Full Code Here

    CqlQueryResult res = qs.execute(query);
    try (QueryHistory.HistoryIterator iterator = hs.read().iterator()) {
      assertEquals(query, iterator.next().query);
    }

    CqlRowMetadata rowMetadata = res.rowMetadata;
    assertEquals(4, rowMetadata.columns.size());

    String comColsStr = rowMetadata.columns.toString();
    assertTrue(comColsStr, rowMetadata.columns.contains(new CqlExtendedColumnName(CqlColumnType.PARTITION_KEY,
        CqlDataType.create(DataType.uuid()), "id")));
View Full Code Here

  @Test
  public void testExecute_SimplePkWithDynamicColumn() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "USE CqlDemo"));
    CqlQueryResult res = qs.execute(new CqlQuery(CqlQueryType.SELECT, "select * from MyBooks where pages=2212"));

    CqlRowMetadata rowMetadata = res.rowMetadata;
    assertTrue(res.toString(), rowMetadata.columns.contains(new CqlExtendedColumnName(CqlColumnType.REGULAR,
        CqlDataType.create(DataType.varchar()), "title")));

    String comColsStr = rowMetadata.columns.toString();
    assertTrue(comColsStr, rowMetadata.columns.contains(new CqlExtendedColumnName(CqlColumnType.PARTITION_KEY,
View Full Code Here

TOP

Related Classes of org.cyclop.model.CqlRowMetadata

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.