Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tory.berra/fix/invalid group clause #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion DataTables-Editor-Server/Field.cs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public Field Xss(Boolean flag)
/// Called by the Editor / Join class instances - not expected for general
/// consumption - internal.
/// </summary>
/// <param name="action">Direction that the data is travelling - 'get' is reading DB data, `create` and `edit` for writing to the DB</param>
/// <param name="action">Direction that the data is traveling - 'get' is reading DB data, `create` and `edit` for writing to the DB</param>
/// <param name="data">Data submitted from the client-side when setting.</param>
/// <returns>true if the field should be used in the get / set.</returns>
internal bool Apply(string action, Dictionary<string, object> data = null)
Expand Down
4 changes: 2 additions & 2 deletions DataTables-Editor-Server/SearchBuilderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ internal List<Dictionary<string, object>> Exec(Field fieldIn, Editor editor, Lis
.Table(this._table)
.LeftJoin(_leftJoin);

if(fieldIn.Apply("get") && fieldIn.GetValue() == null){
if(fieldIn.Apply("get") && fieldIn.GetValue() == null) {
query
.Get(this._value + " as value")
.Get(_label + " as label")
.GroupBy(this._value);
.GroupBy(this._value + ", " + _label);
}

var res = query.Exec()
Expand Down
2 changes: 1 addition & 1 deletion DataTables-Editor-Server/SearchPaneOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ internal List<Dictionary<string, object>> Exec(Field fieldIn, Editor editor, Lis
.Table(table)
.Get(label + " as label")
.Get(value + " as value")
.GroupBy(value)
.GroupBy(value + ", " + label)
.Where(_where)
.LeftJoin(join);

Expand Down