protected virtual void VisitRowNumber(IWindowFunctionBuilder expression) { this.Builder.AppendFormat( "{0}{1}{2} ", this.Dialect.ROW_NUMBER, this.Dialect.OPEN_PARENTHESES, this.Dialect.CLOSE_PARENTHESES ); this.Builder.AppendFormat( "{0}{1} ", this.Dialect.OVER, this.Dialect.OPEN_PARENTHESES ); if (expression.Expressions.Any()) { this.AddRenderContext(RenderHints.FunctionArgument); try { this.Visit(expression.Expressions); } finally { this.RemoveRenderContext(); } } this.Builder.AppendFormat("{0} ", this.Dialect.CLOSE_PARENTHESES); }
protected virtual void VisitWindowFunction(IWindowFunctionBuilder expression) { var handler = default(SqlQueryWriterVisitorHandler); if (!WindowFunctions.TryGetValue(expression.Function, out handler)) { throw new NotImplementedException(); } handler(this, expression); }
protected override void VisitWindowFunction(IWindowFunctionBuilder expression) { base.VisitWindowFunction(expression); this.VisitAlias(expression.Alias); }