Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions DataTables-Editor-Server/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,13 @@ internal HttpRequest Request()
return _request;
}

/// <summary>
/// Apply the global Where filter to the supplied Query
/// </summary>
internal void GetGlobalWhere(Query query)
{
_GetWhere(query);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Private methods
Expand Down
3 changes: 2 additions & 1 deletion DataTables-Editor-Server/SearchBuilderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ internal List<Dictionary<string, object>> Exec(Field fieldIn, Editor editor, Lis
var query = db.Query("select")
.Table(this._table)
.LeftJoin(_leftJoin);

editor.GetGlobalWhere(query);

if(fieldIn.Apply("get") && fieldIn.GetValue() == null){
query
.Get(this._value + " as value")
Expand Down
2 changes: 2 additions & 0 deletions DataTables-Editor-Server/SearchPaneOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ internal List<Dictionary<string, object>> Exec(Field fieldIn, Editor editor, Lis
.GroupBy(value)
.Where(_where)
.LeftJoin(join);
editor.GetGlobalWhere(q);

if (viewTotal) {
q.Get("COUNT(*) as total");
Expand Down Expand Up @@ -330,6 +331,7 @@ internal List<Dictionary<string, object>> Exec(Field fieldIn, Editor editor, Lis
.Distinct(true)
.Table(table)
.LeftJoin(join);
editor.GetGlobalWhere(entriesQuery);

if (fieldIn.Apply("get") && fieldIn.GetValue() == null) {
gettingCount = true;
Expand Down