Open gotmoo opened 10 months ago
fixes #11
This is my take on having SearchPanes and SearchBuilder handle a pre-filtered setup for editor.
1st, in editor.cs, expose the _GetWhere method internally:
editor.cs
/// <summary> /// Apply the global Where filter to the supplied Query /// </summary> internal void GetGlobalWhere(Query query) { _GetWhere(query); }
Then in SearchPaneOptions, apply the filtering twice by calling the above function with the query:
var q = db.Query("select") .Distinct(true) .Table(table) .Get(label + " as label") .Get(value + " as value") .GroupBy(value) .Where(_where) .LeftJoin(join); editor.GetGlobalWhere(q);
and again later:
var entriesQuery = db.Query("select") .Distinct(true) .Table(table) .LeftJoin(join); editor.GetGlobalWhere(entriesQuery);
Similarly, in SearchBuilder:
var query = db.Query("select") .Table(this._table) .LeftJoin(_leftJoin); editor.GetGlobalWhere(query);
fixes #11
This is my take on having SearchPanes and SearchBuilder handle a pre-filtered setup for editor.
1st, in
editor.cs
, expose the _GetWhere method internally:Then in SearchPaneOptions, apply the filtering twice by calling the above function with the query:
and again later:
Similarly, in SearchBuilder: