private static Map<String, CFMetaData> fetchViews(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.VIEWS); for (Row row : session.execute(query, keyspace)) { String name = row.getString("view_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, true, row, name, types)); } return tables; }
private static Map<String, CFMetaData> fetchViews(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.VIEWS); for (Row row : session.execute(query, keyspace)) { String name = row.getString("view_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, true, row, name, types)); } return tables; }
private static Map<String, CFMetaData> fetchTables(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.TABLES); for (Row row : session.execute(query, keyspace)) { String name = row.getString("table_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, false, row, name, types)); } return tables; }
private static Map<String, CFMetaData> fetchTables(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.TABLES); for (Row row : session.execute(query, keyspace)) { String name = row.getString("table_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, false, row, name, types)); } return tables; }
private static Map<String, CFMetaData> fetchTables(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.TABLES); for (Row row : session.execute(query, keyspace)) { String name = row.getString("table_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, false, row, name, types)); } return tables; }
private static Map<String, CFMetaData> fetchViews(String keyspace, Session session, IPartitioner partitioner, Types types) { Map<String, CFMetaData> tables = new HashMap<>(); String query = String.format("SELECT * FROM %s.%s WHERE keyspace_name = ?", SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.VIEWS); for (Row row : session.execute(query, keyspace)) { String name = row.getString("view_name"); tables.put(name, createTableMetadata(keyspace, session, partitioner, true, row, name, types)); } return tables; }