public FilterQueryPlan GetFilterQueryPlan(string filterString, string collectionRole, bool shallow, IDictionary <string, IFilter> enabledFilters) { var key = new FilterQueryPlanKey(filterString, collectionRole, shallow, enabledFilters); var plan = (FilterQueryPlan)planCache[key]; if (plan == null) { if (log.IsDebugEnabled) { log.Debug("unable to locate collection-filter query plan in cache; generating (" + collectionRole + " : " + filterString + ")"); } plan = new FilterQueryPlan(filterString.ToQueryExpression(), collectionRole, shallow, enabledFilters, factory); planCache.Put(key, plan); } else { if (log.IsDebugEnabled) { log.Debug("located collection-filter query plan in cache (" + collectionRole + " : " + filterString + ")"); } } return(plan); }
public FilterQueryPlan GetFilterQueryPlan(string filterString, string collectionRole, bool shallow, IDictionary<string, IFilter> enabledFilters) { FilterQueryPlanKey key = new FilterQueryPlanKey(filterString, collectionRole, shallow, enabledFilters); FilterQueryPlan plan = (FilterQueryPlan)planCache[key]; if (plan == null) { if (log.IsDebugEnabled) { log.Debug("unable to locate collection-filter query plan in cache; generating (" + collectionRole + " : " + filterString + ")"); } plan = new FilterQueryPlan(filterString, collectionRole, shallow, enabledFilters, factory); } else { if (log.IsDebugEnabled) { log.Debug("located collection-filter query plan in cache (" + collectionRole + " : " + filterString + ")"); } } planCache.Put(key, plan); return plan; }
public IQueryExpressionPlan GetFilterQueryPlan(IQueryExpression queryExpression, string collectionRole, bool shallow, IDictionary <string, IFilter> enabledFilters) { var key = new FilterQueryPlanKey(queryExpression.Key, collectionRole, shallow, enabledFilters); var plan = (QueryExpressionPlan)planCache[key]; if (plan == null) { log.DebugFormat("unable to locate collection-filter query plan in cache; generating ({0} : {1})", collectionRole, queryExpression.Key); plan = new FilterQueryPlan(queryExpression, collectionRole, shallow, enabledFilters, factory); planCache.Put(key, plan); } else { log.DebugFormat("located collection-filter query plan in cache ({0} : {1})", collectionRole, queryExpression.Key); plan = CopyIfRequired(plan, queryExpression); } return(plan); }
protected FilterQueryPlan(FilterQueryPlan source, IQueryExpression expression) : base(source, expression) { CollectionRole = source.CollectionRole; }