public QupidQuery(PropertyList pl, string collection, List<WhereClause> where, UnwindClause unwind, GroupByClause groupBy, HavingClause have, WithClause with) { CollectionName = collection; SelectProperties = pl; WhereClauses = where; UnwindClause = unwind; GroupByClause = groupBy; HavingClause = have; WithClause = with; }
private void AnalyzeWithClause(QupidCollection collection, WithClause with) { if (with != null) { var withTable = with.JoinOnTable; var columns = _query.SelectProperties.Properties .Where(p => p.Collection.Equals(withTable, StringComparison.OrdinalIgnoreCase)) .ToList(); with.SelectedColumns = columns; var shortName = collection.ConvertToShortPath(with.JoinProperty.Path); if (shortName == null) { _compiler.ErrorManager.AddError("The 'with' property (" + with.JoinProperty.Path + ") is invalid."); return; } with.JoinProperty.AnalyzedName = shortName; if (String.IsNullOrWhiteSpace(with.JoinProperty.Alias)) { with.JoinProperty.Alias = shortName; } } }