@Override public String toString() { if (virtual) { return name; } return asCQLQuery(); }
StringBuilder sb = new StringBuilder(); sb.append(asCQLQuery()).append('\n');
@Override public String toString() { return asCQLQuery(); }
@Override public String toString() { return asCQLQuery(); }
@Override public String toString() { return asCQLQuery(); }
assertThat(km.getMaterializedViews().size()).isEqualTo(0); assertThat(km.getAggregates().size()).isEqualTo(0); assertThat(km.asCQLQuery()) .isEqualTo( "/* VIRTUAL KEYSPACE system_views WITH REPLICATION = { 'class' : 'null' } "
/** * Returns a {@code String} containing CQL queries representing this * keyspace and the table it contains. * * In other words, this method returns the queries that would allow to * recreate the schema of this keyspace, along with all its table. * * Note that the returned String is formatted to be human readable (for * some definition of human readable at least). * * @return the CQL queries representing this keyspace schema as a {code * String}. */ public String exportAsString() { StringBuilder sb = new StringBuilder(); sb.append(asCQLQuery()).append('\n'); for (TableMetadata tm : tables.values()) sb.append('\n').append(tm.exportAsString()).append('\n'); return sb.toString(); }
/** * Returns a {@code String} containing CQL queries representing this * keyspace and the user types and tables it contains. * <p/> * In other words, this method returns the queries that would allow to * recreate the schema of this keyspace, along with all its user * types/tables. * <p/> * Note that the returned String is formatted to be human readable (for * some definition of human readable at least). * * @return the CQL queries representing this keyspace schema as a {code * String}. */ public String exportAsString() { StringBuilder sb = new StringBuilder(); sb.append(asCQLQuery()).append('\n'); for (UserType udt : userTypes.values()) sb.append('\n').append(udt.exportAsString()).append('\n'); for (TableMetadata tm : tables.values()) sb.append('\n').append(tm.exportAsString()).append('\n'); for (FunctionMetadata fm : functions.values()) sb.append('\n').append(fm.exportAsString()).append('\n'); for (AggregateMetadata am : aggregates.values()) sb.append('\n').append(am.exportAsString()).append('\n'); return sb.toString(); }
/** * Returns a {@code String} containing CQL queries representing this * keyspace and the user types and tables it contains. * <p/> * In other words, this method returns the queries that would allow to * recreate the schema of this keyspace, along with all its user * types/tables. * <p/> * Note that the returned String is formatted to be human readable (for * some definition of human readable at least). * * @return the CQL queries representing this keyspace schema as a {code * String}. */ public String exportAsString() { StringBuilder sb = new StringBuilder(); sb.append(asCQLQuery()).append('\n'); for (UserType udt : userTypes.values()) sb.append('\n').append(udt.exportAsString()).append('\n'); for (TableMetadata tm : tables.values()) sb.append('\n').append(tm.exportAsString()).append('\n'); for (FunctionMetadata fm : functions.values()) sb.append('\n').append(fm.exportAsString()).append('\n'); for (AggregateMetadata am : aggregates.values()) sb.append('\n').append(am.exportAsString()).append('\n'); return sb.toString(); }
/** * Returns a {@code String} containing CQL queries representing this * keyspace and the user types and tables it contains. * <p/> * In other words, this method returns the queries that would allow to * recreate the schema of this keyspace, along with all its user * types/tables. * <p/> * Note that the returned String is formatted to be human readable (for * some definition of human readable at least). * * @return the CQL queries representing this keyspace schema as a {code * String}. */ public String exportAsString() { StringBuilder sb = new StringBuilder(); sb.append(asCQLQuery()).append('\n'); for (UserType udt : userTypes.values()) sb.append('\n').append(udt.exportAsString()).append('\n'); for (TableMetadata tm : tables.values()) sb.append('\n').append(tm.exportAsString()).append('\n'); for (FunctionMetadata fm : functions.values()) sb.append('\n').append(fm.exportAsString()).append('\n'); for (AggregateMetadata am : aggregates.values()) sb.append('\n').append(am.exportAsString()).append('\n'); return sb.toString(); }
assertThat(km.getMaterializedViews().size()).isEqualTo(0); assertThat(km.getAggregates().size()).isEqualTo(0); assertThat(km.asCQLQuery()) .isEqualTo( "/* VIRTUAL KEYSPACE system_views WITH REPLICATION = { 'class' : 'null' } "