예제 #1
0
        private void AddParameterValueSet(ExtractionFilter filter)
        {
            var parameterSet = new ExtractionFilterParameterSet(RepositoryLocator.CatalogueRepository, filter);

            parameterSet.CreateNewValueEntries();
            Publish(filter);
            Activate(parameterSet);
        }
예제 #2
0
        public override void Execute()
        {
            base.Execute();

            var parameterSet = new ExtractionFilterParameterSet(BasicActivator.RepositoryLocator.CatalogueRepository, _filter);

            parameterSet.CreateNewValueEntries();
            Publish(_filter);
            Activate(parameterSet);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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());
        }