Ejemplo n.º 1
0
        public bool HasNonKeySelects()
        {
            if (!TabularDataSourceInfo.IsSelectable)
            {
                return(false);
            }

            Contracts.Assert(TabularDataSourceInfo.GetKeyColumns().All(x => _selects.Contains(x)));

            return(TabularDataSourceInfo.GetKeyColumns().Count() < _selects.Count &&
                   _selects.Count < TexlBinding.MaxSelectsToInclude);
        }
Ejemplo n.º 2
0
        public bool AddSelect(string selectColumnName)
        {
            if (string.IsNullOrEmpty(selectColumnName))
            {
                return(false);
            }

            if (_selects.Contains(selectColumnName) ||
                !TabularDataSourceInfo.CanIncludeSelect(selectColumnName))
            {
                return(false);
            }

            return(_selects.Add(selectColumnName));
        }
Ejemplo n.º 3
0
        internal bool AddExpand(IExpandInfo expandInfo, out ExpandQueryOptions expandQueryOptions)
        {
            if (expandInfo == null || !TabularDataSourceInfo.CanIncludeExpand(expandInfo))
            {
                expandQueryOptions = null;
                return(false);
            }

            if (_expandQueryOptions.ContainsKey(expandInfo.ExpandPath))
            {
                expandQueryOptions = (ExpandQueryOptions)_expandQueryOptions[expandInfo.ExpandPath];
                return(false);
            }

            expandQueryOptions = ExpandQueryOptions.CreateExpandQueryOptions(expandInfo);
            return(AddExpand(expandInfo.ExpandPath, expandQueryOptions));
        }