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); }
public bool AddSelect(string selectColumnName) { if (string.IsNullOrEmpty(selectColumnName)) { return(false); } if (_selects.Contains(selectColumnName) || !TabularDataSourceInfo.CanIncludeSelect(selectColumnName)) { return(false); } return(_selects.Add(selectColumnName)); }
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)); }