public void Visit(RowNumberField component) { sql.Append("ROW_NUMBER()"); if (component.PartitionBy.Count + component.OrderBy.Count > 0) { sql.Append(" OVER ("); if (component.PartitionBy.Count > 0) { sql.Append("PARTITION BY "); component.PartitionBy.First().Accept(this); foreach (var item in component.PartitionBy.Skip(1)) { sql.Append(", "); item.Accept(this); } } if (component.OrderBy.Count > 0) { sql.Append((component.PartitionBy.Count > 0 ? " " : "") + "ORDER BY "); component.OrderBy.First().Accept(this); foreach (var item in component.OrderBy.Skip(1)) { sql.Append(", "); item.Accept(this); } } sql.Append(")"); } }
public void Visit(RowNumberField component) { throw new NotImplementedException(); }