return builder.build();
return builder.build();
return builder.build();
cfmBuilder.withId(properties.properties.getId()); CFMetaData viewCfm = cfmBuilder.build().params(params); ViewDefinition definition = new ViewDefinition(keyspace(), columnFamily(),
cfmBuilder.withId(properties.properties.getId()); CFMetaData viewCfm = cfmBuilder.build().params(params); ViewDefinition definition = new ViewDefinition(keyspace(), columnFamily(),
cfmBuilder.withId(properties.properties.getId()); CFMetaData viewCfm = cfmBuilder.build().params(params); ViewDefinition definition = new ViewDefinition(keyspace(), columnFamily(),
return builder.build().reloadIndexMetadataProperties(baseCfsMetadata);
return builder.build().reloadIndexMetadataProperties(baseCfsMetadata);
return builder.build().reloadIndexMetadataProperties(baseCfsMetadata);
public static CFMetaData compile(String cql, String keyspace) { CFStatement parsed = (CFStatement)QueryProcessor.parseStatement(cql); parsed.prepareKeyspace(keyspace); CreateTableStatement statement = (CreateTableStatement) ((CreateTableStatement.RawStatement) parsed).prepare(Types.none()).statement; return statement.metadataBuilder() .withId(generateLegacyCfId(keyspace, statement.columnFamily())) .build() .params(statement.params()) .readRepairChance(0.0) .dcLocalReadRepairChance(0.0) .gcGraceSeconds(0) .memtableFlushPeriod((int) TimeUnit.HOURS.toMillis(1)); }
public static CFMetaData compile(String cql, String keyspace) { CFStatement parsed = (CFStatement)QueryProcessor.parseStatement(cql); parsed.prepareKeyspace(keyspace); CreateTableStatement statement = (CreateTableStatement) ((CreateTableStatement.RawStatement) parsed).prepare(Types.none()).statement; return statement.metadataBuilder() .withId(generateLegacyCfId(keyspace, statement.columnFamily())) .build() .params(statement.params()) .readRepairChance(0.0) .dcLocalReadRepairChance(0.0) .gcGraceSeconds(0) .memtableFlushPeriod((int) TimeUnit.HOURS.toMillis(1)); }
/** * Returns a CFMetaData instance based on the parameters parsed from this * {@code CREATE} statement, or defaults where applicable. * * @return a CFMetaData instance corresponding to the values parsed from this statement * @throws InvalidRequestException on failure to validate parsed parameters */ public CFMetaData getCFMetaData() { return metadataBuilder().build().params(params); }
public static CFMetaData compile(String cql, KeyspaceMetadata ksm) { CFStatement parsed = (CFStatement)QueryProcessor.parseStatement(cql); parsed.prepareKeyspace(ksm.name); CreateTableStatement statement = (CreateTableStatement) ((CreateTableStatement.RawStatement) parsed).prepare(ksm, ksm.types).statement; return statement.metadataBuilder() .withId(generateLegacyCfId(ksm.name, statement.columnFamily())) .build() .params(statement.params()) .readRepairChance(0.0) .dcLocalReadRepairChance(0.0) .gcGraceSeconds(0) .memtableFlushPeriod((int) TimeUnit.HOURS.toMillis(1)); }
/** * There is a couple of places in the code where we need a CFMetaData object and don't have one readily available * and know that only the keyspace and name matter. This creates such "fake" metadata. Use only if you know what * you're doing. */ public static CFMetaData createFake(String keyspace, String name) { return CFMetaData.Builder.create(keyspace, name).addPartitionKey("key", BytesType.instance).build(); }
/** * Returns a CFMetaData instance based on the parameters parsed from this * {@code CREATE} statement, or defaults where applicable. * * @return a CFMetaData instance corresponding to the values parsed from this statement * @throws InvalidRequestException on failure to validate parsed parameters */ public CFMetaData getCFMetaData() { return metadataBuilder().build().params(params); }
/** * There is a couple of places in the code where we need a CFMetaData object and don't have one readily available * and know that only the keyspace and name matter. This creates such "fake" metadata. Use only if you know what * you're doing. */ public static CFMetaData createFake(String keyspace, String name) { return CFMetaData.Builder.create(keyspace, name).addPartitionKey("key", BytesType.instance).build(); }
/** * Returns a CFMetaData instance based on the parameters parsed from this * {@code CREATE} statement, or defaults where applicable. * * @return a CFMetaData instance corresponding to the values parsed from this statement * @throws InvalidRequestException on failure to validate parsed parameters */ public CFMetaData getCFMetaData() { return metadataBuilder().build().params(params); }
/** * There is a couple of places in the code where we need a CFMetaData object and don't have one readily available * and know that only the keyspace and name matter. This creates such "fake" metadata. Use only if you know what * you're doing. */ public static CFMetaData createFake(String keyspace, String name) { return CFMetaData.Builder.create(keyspace, name).addPartitionKey("key", BytesType.instance).build(); }
/** * There is a couple of places in the code where we need a CFMetaData object and don't have one readily available * and know that only the keyspace and name matter. This creates such "fake" metadata. Use only if you know what * you're doing. */ public static CFMetaData createFake(String keyspace, String name) { return CFMetaData.Builder.create(keyspace, name).addPartitionKey("key", BytesType.instance).build(); }