Пример #1
0
        internal RankingOrderByChainer(Chainer prev, OrderingArgument[] columns)
            : base(prev)
        {
            Build = (buildContext, buildArgs) =>
            {
                var sql = Text.GenerateSql(30)
                          .Append(Text.OrderBy).S()
                          .Append(OrderingArgument.Concatenate(columns, buildContext, buildArgs, false))
                          .ToString();

                TryThrow(buildContext);

                return(sql);
            };
        }
Пример #2
0
        private void _Body(OrderingArgument[] columns)
        {
            Query.Clause.OrderBy = this;

            CheckNullOrEmptyAndThrow(Argc(() => columns, columns));

            Query.AddArguments(columns);

            Build = (buildContext, buildArgs) =>
            {
                var sql = Text.GenerateSql(100)
                          .NewLine(Text.OrderBy).S()
                          .Append(OrderingArgument.Concatenate(columns, buildContext, buildArgs, false))
                          .ToString();

                TryThrow(buildContext);

                return(sql);
            };
        }