private String GenerateSelect() { StringBuilder sbSql = StringHelper.CreateBuilder(); if (_projection == null) { sbSql.Append(_table.ToSqlSelect(_factory.Dialect, _factory.Mapping.Catalog, _factory.Mapping.Schema, false)); } else { sbSql.Append("SELECT ") .Append(_projection.Render(this)) .Append(" FROM ") .Append(_table.GetQualifiedName(_factory.Dialect, _factory.Mapping.Catalog, _factory.Mapping.Schema)); } GenerateFragment(sbSql, "WHERE", _conditions, " AND "); if (_projection != null && _projection.Grouped) { sbSql.Append(" GROUP BY ").Append(_projection.ToGroupString(this)); } return(sbSql.ToString()); }
/// <inheritdoc/> public String ToGroupString(ICriteria criteria) { return(_projection.ToGroupString(criteria)); }