@Override protected QueryMetadataInterface createDesignTimeMetadata() { return new MultiSourceMetadataWrapper(actualMetadata.getDesignTimeMetadata(), multiSourceModels); }
@Override protected QueryMetadataInterface createDesignTimeMetadata() { return new MultiSourceMetadataWrapper(actualMetadata.getDesignTimeMetadata(), multiSourceModels); }
@Override protected QueryMetadataInterface createDesignTimeMetadata() { return new MultiSourceMetadataWrapper(actualMetadata.getDesignTimeMetadata(), multiSourceModels); }
@Test public void testMultiSourceInsert() throws Exception { Set<String> models = new HashSet<String>(); models.add("pm1"); helpValidate("insert into pm1.g1 (e1) values (1)", new String[] {"pm1.g1", "pm1.g1.SOURCE_NAME"}, new MultiSourceMetadataWrapper(RealMetadataFactory.example1(), models)); //$NON-NLS-1$ }
/** * TODO: this should be allowable */ @Test public void testDisallowProjectIntoMultiSource() throws Exception { Set<String> models = new HashSet<String>(); models.add("pm1"); helpValidate("insert into pm1.g1 select pm1.g1.*, 1 from pm1.g1", new String[] {"pm1.g1"}, new MultiSourceMetadataWrapper(RealMetadataFactory.example1(), models)); //$NON-NLS-1$ }
@Test public void testMultiSourceProcValue() throws Exception { Set<String> models = new HashSet<String>(); models.add("MultiModel"); helpValidate("exec MultiModel.proc('a', (select 1))", new String[] {}, new MultiSourceMetadataWrapper(RealMetadataFactory.exampleMultiBinding(), models)); //$NON-NLS-1$ }
Map<String, String> multiSourceModels = MultiSourceMetadataWrapper.getMultiSourceModels(mergedVDB); if(multiSourceModels != null && !multiSourceModels.isEmpty()) { qmi = new MultiSourceMetadataWrapper(metadata, multiSourceModels);
@Test public void testDisallowUpdateOnMultisourceElement() throws Exception { Set<String> models = new HashSet<String>(); models.add("pm1"); ValidatorReport report = helpValidateInModeler("pm1.vsp36", "UPDATE PM1.G1 set SOURCE_NAME='blah'", new MultiSourceMetadataWrapper(RealMetadataFactory.example1(), models)); //$NON-NLS-1$ assertEquals(report.toString(), 1, report.getItems().size()); }
@Test public void testMultiSourcePseudoElement() throws Exception { HashSet<String> multiSourceModels = new HashSet<String>(); multiSourceModels.add("BQT1"); MultiSourceMetadataWrapper wrapper = new MultiSourceMetadataWrapper(RealMetadataFactory.exampleBQTCached(), multiSourceModels);
QueryMetadataInterface wrapper = new MultiSourceMetadataWrapper(metadata, multiSourceModels); wrapper = new TempMetadataAdapter(wrapper, new TempMetadataStore()); DQPWorkContext workContext = RealMetadataFactory.buildWorkContext(wrapper, vdb);