public override SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery) { if (!grouped) { throw new InvalidOperationException("not a grouping projection"); } return(new SqlString(StringHelper.Join(",", criteriaQuery.GetColumns(criteria, propertyName)))); }
public override SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary<string, IFilter> enabledFilters) { if (!grouped) { throw new InvalidOperationException("not a grouping projection"); } return new SqlString(StringHelper.Join(",", criteriaQuery.GetColumns(criteria, propertyName))); }
public virtual SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery) { if (projection is IPropertyProjection propertyProjection) { return(new SqlString(string.Join(", ", criteriaQuery.GetColumns(criteria, propertyProjection.PropertyName)))); } //This is kind of a hack. The hack is based on the fact that ToGroupSqlString always called after ToSqlString. return(SqlStringHelper.RemoveAsAliasesFromSql(renderedProjection)); }
protected override SqlString ToLeftSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery) { var columns = criteriaQuery.GetColumns(criteria, propertyName); if (columns.Length <= 1) { return(new SqlString(columns)); } return(new SqlString("(", string.Join(", ", columns), ")")); }