public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
        {
            Debug.Assert(queryModel != null);

            var qryData = GetQueryData(queryModel);

            Debug.WriteLine("\nFields Query: {0} | {1}", qryData.QueryText,
                            string.Join(", ", qryData.Parameters.Select(x => x == null ? "null" : x.ToString())));

            var qry = GetFieldsQuery(qryData.QueryText, qryData.Parameters.ToArray());

            var selector = GetResultSelector <T>(queryModel.SelectClause.Selector);

            return(_cache.QueryFields(qry, selector));
        }
Exemple #2
0
        public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
        {
            Debug.Assert(queryModel != null);

            var qryData = GetQueryData(queryModel);

            Debug.WriteLine("\nFields Query: {0} | {1}", qryData.QueryText,
                            string.Join(", ", qryData.Parameters.Select(x => x == null ? "null" : x.ToString())));

            var qry = new SqlFieldsQuery(qryData.QueryText, _local, qryData.Parameters.ToArray())
            {
                EnableDistributedJoins = _enableDistributedJoins,
                PageSize         = _pageSize,
                EnforceJoinOrder = _enforceJoinOrder
            };

            var selector = GetResultSelector <T>(queryModel.SelectClause.Selector);

            return(_cache.QueryFields(qry, selector));
        }