private SqlSelectClause( SqlSelectSpec selectSpec, SqlTopSpec topSpec = null, bool hasDistinct = false) { this.SelectSpec = selectSpec ?? throw new ArgumentNullException(nameof(selectSpec)); this.TopSpec = topSpec; this.HasDistinct = hasDistinct; }
private SqlSelectClause(SqlSelectSpec selectSpec, SqlTopSpec topSpec = null, bool hasDistinct = false) : base(SqlObjectKind.SelectClause) { if (selectSpec == null) { throw new ArgumentNullException("selectSpec"); } this.SelectSpec = selectSpec; this.TopSpec = topSpec; this.HasDistinct = hasDistinct; }
protected SqlSelectSpec Visit(SqlSelectSpec spec) { switch (spec.Kind) { case SqlObjectKind.SelectListSpec: return(Visit(spec as SqlSelectListSpec)); case SqlObjectKind.SelectStarSpec: return(Visit(spec as SqlSelectStarSpec)); case SqlObjectKind.SelectValueSpec: return(Visit(spec as SqlSelectValueSpec)); default: throw new InvalidProgramException( string.Format(CultureInfo.InvariantCulture, "Unexpected SqlObjectKind {0}", spec.Kind)); } }
public static SqlSelectClause Create(SqlSelectSpec selectSpec, SqlTopSpec topSpec = null, bool hasDistinct = false) { return(new SqlSelectClause(selectSpec, topSpec, hasDistinct)); }