示例#1
0
        public override void Apply(CountQuery query)
        {
            if (mExcludeBlogImages)
            {
                query.Add(Expression.Sql("NOT EXISTS ( SELECT * FROM PostImage e WHERE e.Image_Id = this_.Image_Id )"));
                query.Add(Expression.Sql("NOT EXISTS ( SELECT * FROM Highlight h WHERE h.Image_Id = this_.Image_Id )"));
            }

            base.Apply(query);
        }
示例#2
0
 public override void Apply(CountQuery query)
 {
     if (SourceId != 0)
     {
         query.Add(Expression.Eq("SourceId", SourceId));
     }
     if (!string.IsNullOrEmpty(SourceType))
     {
         query.Add(Expression.Eq("SourceType", SourceType));
     }
     base.Apply(query);
 }
示例#3
0
        public override void Apply(CountQuery query)
        {
            if (DateStart != DateTime.MinValue)
            {
                query.Add(Expression.Ge("Created", DateStart));
            }

            base.Apply(query);
        }
示例#4
0
        public override void Apply(CountQuery query)
        {
            if (!string.IsNullOrEmpty(SearchQuery))
            {
                query.Add(Expression.Like("Word", string.Format("%{0}%", SearchQuery)));
            }

            base.Apply(query);
        }
示例#5
0
        public override void Apply(CountQuery query)
        {
            if (Type != TransitFeedType.Unknown)
            {
                query.Add(Expression.Eq("Type", Type.ToString()));
            }

            base.Apply(query);
        }
示例#6
0
        public override void Apply(CountQuery query)
        {
            if (PostId != 0)
            {
                query.Add(Expression.Eq("Post.Id", PostId));
            }

            base.Apply(query);
        }
示例#7
0
        public override void Apply(CountQuery query)
        {
            if (FeedId != 0)
            {
                query.Add(Expression.Eq("Feed.Id", FeedId));
            }

            base.Apply(query);
        }
示例#8
0
        public override void Apply(CountQuery query)
        {
            if (AssociatedId != 0)
            {
                query.Add(Expression.Eq(string.Format("{0}.Id", Table), AssociatedId));
            }

            base.Apply(query);
        }
示例#9
0
        public override void Apply(CountQuery query)
        {
            if (PostId != 0)
            {
                query.Add(Expression.Eq("Post.Id", PostId));
            }

            if (PreferredOnly)
            {
                throw new NotImplementedException();
            }

            base.Apply(query);
        }
示例#10
0
        public override void Apply(CountQuery query)
        {
            if (TopicId != 0)
            {
                query.Add(Expression.Sql(string.Format("EXISTS ( SELECT * FROM PostTopic t WHERE t.Post_Id = this_.Post_Id AND t.Topic_Id = {0})",
                                                       TopicId)));
            }

            if (!string.IsNullOrEmpty(Query))
            {
                query.Add(Expression.Sql(string.Format("( FREETEXT (Title, '{0}') OR FREETEXT (Body, '{0}') )",
                                                       Renderer.SqlEncode(Query))));
            }

            if (DateStart != DateTime.MinValue)
            {
                query.Add(Expression.Ge("Created", DateStart));
            }

            if (DateEnd != DateTime.MaxValue)
            {
                query.Add(Expression.Le("Created", DateEnd));
            }

            if (PublishedOnly)
            {
                query.Add(Expression.Eq("Publish", true));
            }

            if (DisplayedOnly)
            {
                query.Add(Expression.Eq("Display", true));
            }

            base.Apply(query);
        }
示例#11
0
        public override void Apply(CountQuery query)
        {
            if (PostId != 0)
            {
                query.Add(Expression.Eq("Post.Id", PostId));
            }

            base.Apply(query);
        }
示例#12
0
        public override void Apply(CountQuery query)
        {
            if (AssociatedId != 0)
            {
                query.Add(Expression.Eq(string.Format("{0}.Id", Table), AssociatedId));
            }

            base.Apply(query);
        }
示例#13
0
        public override void Apply(CountQuery query)
        {
            if (FeedId != 0)
            {
                query.Add(Expression.Eq("Feed.Id", FeedId));
            }

            base.Apply(query);
        }
示例#14
0
        public override void Apply(CountQuery query)
        {
            if (TopicId != 0)
            {
                query.Add(Expression.Sql(string.Format("EXISTS ( SELECT * FROM PostTopic t WHERE t.Post_Id = this_.Post_Id AND t.Topic_Id = {0})",
                    TopicId)));
            }

            if (! string.IsNullOrEmpty(Query))
            {
                query.Add(Expression.Sql(string.Format("( FREETEXT (Title, '{0}') OR FREETEXT (Body, '{0}') )",
                    Renderer.SqlEncode(Query))));
            }

            if (DateStart != DateTime.MinValue)
            {
                query.Add(Expression.Ge("Created", DateStart));
            }

            if (DateEnd != DateTime.MaxValue)
            {
                query.Add(Expression.Le("Created", DateEnd));
            }

            if (PublishedOnly)
            {
                query.Add(Expression.Eq("Publish", true));
            }

            if (DisplayedOnly)
            {
                query.Add(Expression.Eq("Display", true));
            }

            base.Apply(query);
        }
示例#15
0
        public override void Apply(CountQuery query)
        {
            if (!string.IsNullOrEmpty(SearchQuery))
            {
                query.Add(Expression.Like("Word", string.Format("%{0}%", SearchQuery)));
            }

            base.Apply(query);
        }
示例#16
0
        public override void Apply(CountQuery query)
        {
            if (Type != TransitFeedType.Unknown)
            {
                query.Add(Expression.Eq("Type", Type.ToString()));
            }

            base.Apply(query);
        }
示例#17
0
 public override void Apply(CountQuery query)
 {
     if (SourceId != 0) query.Add(Expression.Eq("SourceId", SourceId));
     if (!string.IsNullOrEmpty(SourceType)) query.Add(Expression.Eq("SourceType", SourceType));
     base.Apply(query);
 }
示例#18
0
        public override void Apply(CountQuery query)
        {
            if (PostId != 0)
            {
                query.Add(Expression.Eq("Post.Id", PostId));
            }

            if (PreferredOnly)
            {
                throw new NotImplementedException();
            }

            base.Apply(query);
        }
示例#19
0
        public override void Apply(CountQuery query)
        {
            if (mExcludeBlogImages)
            {
                query.Add(Expression.Sql("NOT EXISTS ( SELECT * FROM PostImage e WHERE e.Image_Id = this_.Image_Id )"));
                query.Add(Expression.Sql("NOT EXISTS ( SELECT * FROM Highlight h WHERE h.Image_Id = this_.Image_Id )"));
            }

            base.Apply(query);
        }
示例#20
0
        public override void Apply(CountQuery query)
        {
            if (DateStart != DateTime.MinValue)
            {
                query.Add(Expression.Ge("Created", DateStart));
            }

            base.Apply(query);
        }