private void AddParameterValueSet(ExtractionFilter filter) { var parameterSet = new ExtractionFilterParameterSet(RepositoryLocator.CatalogueRepository, filter); parameterSet.CreateNewValueEntries(); Publish(filter); Activate(parameterSet); }
public override void Execute() { base.Execute(); var parameterSet = new ExtractionFilterParameterSet(BasicActivator.RepositoryLocator.CatalogueRepository, _filter); parameterSet.CreateNewValueEntries(); Publish(_filter); Activate(parameterSet); }
private ExtractionFilter GetFilterWithParameterSet() { var cata = new Catalogue(CatalogueRepository, "myCata"); var cataItem = new CatalogueItem(CatalogueRepository, cata, "MyCol"); var table = new TableInfo(CatalogueRepository, "myTbl"); var col = new ColumnInfo(CatalogueRepository, "myCol", "varchar(10)", table); var ei = new ExtractionInformation(CatalogueRepository, cataItem, col, "[myTbl].[mycol]"); var filter = new ExtractionFilter(CatalogueRepository, "Age", ei); filter.WhereSQL = "Age >= @age"; new ExtractionFilterParameter(CatalogueRepository, "DECLARE @age int", filter); var paramSet = new ExtractionFilterParameterSet(CatalogueRepository, filter, "Old"); paramSet.CreateNewValueEntries(); return(filter); }
public void ExtractionFilterParameterSet_Deleting() { var cata = new Catalogue(CatalogueRepository, "myCata"); var cataItem = new CatalogueItem(CatalogueRepository, cata, "MyCol"); var table = new TableInfo(CatalogueRepository, "myTbl"); var col = new ColumnInfo(CatalogueRepository, "myCol", "varchar(10)", table); var ei = new ExtractionInformation(CatalogueRepository, cataItem, col, "[myTbl].[mycol]"); var filter = new ExtractionFilter(CatalogueRepository, "Age", ei); filter.WhereSQL = "Age >= @age"; new ExtractionFilterParameter(CatalogueRepository, "DECLARE @age int", filter); var paramSet = new ExtractionFilterParameterSet(CatalogueRepository, filter, "Old"); var vals = paramSet.CreateNewValueEntries(); Assert.AreEqual(1, vals.Length); Assert.IsTrue(vals[0].Exists()); paramSet.DeleteInDatabase(); Assert.IsFalse(paramSet.Exists()); Assert.IsFalse(vals[0].Exists()); }