private BoundExpression BindSingleRowSubselect(SingleRowSubselectSyntax node) { // TODO: Ensure query has no ORDER BY unless TOP is also specified var boundQuery = BindSubquery(node.Query); if (boundQuery.OutputColumns.Length == 0) { // This can happen in cases like this: // // SELECT (SELECT * FROM // FROM EmployeeTerritories et // // We shouldn't report an error but we can't return bound // single row subselect either. return(new BoundErrorExpression()); } if (boundQuery.OutputColumns.Length > 1) { Diagnostics.ReportTooManyExpressionsInSelectListOfSubquery(node.Span); } var value = boundQuery.OutputColumns.First().ValueSlot; return(new BoundSingleRowSubselect(value, boundQuery.Relation)); }
public virtual void VisitSingleRowSubselect(SingleRowSubselectSyntax node) { DefaultVisit(node); }
public virtual TResult VisitSingleRowSubselect(SingleRowSubselectSyntax node) { return(DefaultVisit(node)); }