public TableMetadataAssert isInKeyspace(String keyspaceName) { assertThat(actual.getKeyspace().getName()).isEqualTo(keyspaceName); return this; }
Delete(TableMetadata table, List<Selector> columns) { this( Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columns); }
Update(TableMetadata table) { this( Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Truncate(TableMetadata table) { this( Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Insert(TableMetadata table) { this( Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Select(TableMetadata table, List<Object> columnNames, boolean isDistinct, boolean isJson) { this( Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columnNames, isDistinct, isJson); }
/** * Returns a CQL query representing this index. * * <p>This method returns a single 'CREATE INDEX' query corresponding to this index definition. * * @return the 'CREATE INDEX' query corresponding to this index. */ public String asCQLQuery() { String keyspaceName = Metadata.quoteIfNecessary(table.getKeyspace().getName()); String tableName = Metadata.quoteIfNecessary(table.getName()); String indexName = Metadata.quoteIfNecessary(this.name); return isCustomIndex() ? String.format( "CREATE CUSTOM INDEX %s ON %s.%s (%s) USING '%s' %s;", indexName, keyspaceName, tableName, getTarget(), getIndexClassName(), getOptionsAsCql()) : String.format( "CREATE INDEX %s ON %s.%s (%s);", indexName, keyspaceName, tableName, getTarget()); }
assertThat(tm.getId()).isEqualTo(new UUID(0L, 0L)); assertThat(tm.getOptions()).isNull(); assertThat(tm.getKeyspace()).isEqualTo(km); assertThat(tm.asCQLQuery()) .isEqualTo(
BuiltStatement(TableMetadata tableMetadata) { this.partitionKey = tableMetadata.getPartitionKey(); this.routingKey = new ByteBuffer[tableMetadata.getPartitionKey().size()]; this.keyspace = escapeId(tableMetadata.getKeyspace().getName()); }
Update(TableMetadata table) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Truncate(TableMetadata table) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Select(TableMetadata table, List<Object> columnNames, boolean isDistinct, boolean isJson) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columnNames, isDistinct, isJson); }
Insert(TableMetadata table) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Insert(TableMetadata table) { this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Select(TableMetadata table, List<Object> columnNames, boolean isDistinct, boolean isJson) { this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columnNames, isDistinct, isJson); }
Truncate(TableMetadata table) { this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Delete(TableMetadata table, List<Selector> columns) { this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columns); }
Update(TableMetadata table) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }
Delete(TableMetadata table, List<Selector> columns) { this(escapeId(table.getKeyspace().getName()), escapeId(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columns); }
Update(TableMetadata table) { this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); }