@Test public void testRAMDatasource() { Datasource ds = new RAMDatasource("ram", List.of("column"), List.of(new MockDataset(), new MockDataset("ds3", "column", "value3"))); assertEquals(List.of("column"), ds.getSchema()); assertEquals("ram", ds.getName()); QueryResults results = ds.getContents(); assertEquals(2, results.size()); results = ds.getDatasetsByKey(List.of("ds", "ds2")); assertEquals(1, results.size()); results = ds.find(List.of(new QueryPart("column", "value"))); assertEquals(1, results.size()); results = ds.find(List.of()); assertEquals(0, results.size()); results = ds.find(List.of(new QueryPart("column", "value2"))); assertEquals(0, results.size()); }
public RAMDatasource(String name, List<String> schema, List<Dataset> data) { init(name, schema, data); }
RAMDatasource extends Datasource { public RAMDatasource(String name, List<String> schema, List<Dataset> data) { init(name, schema, data); } }
RAMDatasource extends Datasource { public RAMDatasource(String name, List<String> schema, List<Dataset> data) { init(name, schema, data); } RAMDatasource(String name, List<String> schema, List<Dataset> data); protected  RAMDatasource(); }
RAMDatasource extends Datasource { public RAMDatasource(String name, List<String> schema, List<Dataset> data) { init(name, schema, data); } RAMDatasource(String name, List<String> schema, List<Dataset> data); protected  RAMDatasource(); @Override List<String> getSchema(); @Override QueryResults getDatasetsByKey(Collection<String> keys); @Override QueryResults find(List<QueryPart> query); @Override QueryResults getContents(); @Override String getName(); }
RAMDatasource extends Datasource { public RAMDatasource(String name, List<String> schema, List<Dataset> data) { init(name, schema, data); } RAMDatasource(String name, List<String> schema, List<Dataset> data); protected  RAMDatasource(); @Override List<String> getSchema(); @Override QueryResults getDatasetsByKey(Collection<String> keys); @Override QueryResults find(List<QueryPart> query); @Override QueryResults getContents(); @Override String getName();  }