Example #1
0
        string CteFilterInternals(DatasetCompilerContext compilerContext)
        {
            var provider   = DatasetDateFilterProvider.For(compilerContext.Shape);
            var dateFilter = provider.GetDateFilter(compilerContext);

            executionContext.AddParameters(dateFilter.Parameters);
            return($"SELECT * FROM dataset WHERE {dateFilter.Clause}");
        }
Example #2
0
        string CteFilterInternals(DatasetCompilerContext compilerContext)
        {
            var provider = DatasetDateFilterProvider.For(compilerContext);

            // Dynamic datasets may have no datefield
            if (!provider.CanFilter)
            {
                return($"SELECT * FROM dataset");
            }

            var dateFilter = provider.GetDateFilter(compilerContext);

            executionContext.AddParameters(dateFilter.Parameters);
            return($"SELECT * FROM dataset WHERE {dateFilter.Clause}");
        }