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); }
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); }
public override void Apply(CountQuery query) { if (DateStart != DateTime.MinValue) { query.Add(Expression.Ge("Created", DateStart)); } base.Apply(query); }
public override void Apply(CountQuery query) { if (!string.IsNullOrEmpty(SearchQuery)) { query.Add(Expression.Like("Word", string.Format("%{0}%", SearchQuery))); } base.Apply(query); }
public override void Apply(CountQuery query) { if (Type != TransitFeedType.Unknown) { query.Add(Expression.Eq("Type", Type.ToString())); } base.Apply(query); }
public override void Apply(CountQuery query) { if (PostId != 0) { query.Add(Expression.Eq("Post.Id", PostId)); } base.Apply(query); }
public override void Apply(CountQuery query) { if (FeedId != 0) { query.Add(Expression.Eq("Feed.Id", FeedId)); } base.Apply(query); }
public override void Apply(CountQuery query) { if (AssociatedId != 0) { query.Add(Expression.Eq(string.Format("{0}.Id", Table), AssociatedId)); } base.Apply(query); }
public override void Apply(CountQuery query) { if (PostId != 0) { query.Add(Expression.Eq("Post.Id", PostId)); } if (PreferredOnly) { throw new NotImplementedException(); } base.Apply(query); }
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); }
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); }
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); }