Skip to content

Commit

Permalink
DbDataView: do not wrap select expressions with brackets (some databa…
Browse files Browse the repository at this point in the history
…ses like sqlite don't support this syntax)
  • Loading branch information
VitaliyMF committed Jan 8, 2017
1 parent 29b4d1a commit f58f92c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NReco.Data/DbDataView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ string BuildSelectColumns(Query query, ISqlExpressionBuilder sqlBuilder) {
// special handling for 'count(*)' mapping
if (f.Expression.ToLower()=="count(*)")
fld = ApplyFieldMapping("count(*)");
fld = String.IsNullOrEmpty(f.Name) ? fld : String.Format("({0}) as {1}", fld, sqlBuilder.BuildValue((QField)f.Name) );
fld = String.IsNullOrEmpty(f.Name) ? fld : String.Format("{0} as {1}", fld, sqlBuilder.BuildValue((QField)f.Name) );
}
if (columns.Length>0)
columns.Append(',');
Expand Down

0 comments on commit f58f92c

Please sign in to comment.