public void testOffsetLimit_option()
        {
            var expected =
                "select emp.id from emp order by emp.id  offset 5 rows fetch next 10 rows only option (maxrecursion 0)";
            var transformer = new MssqlPagingTransformer(5, 10, false, null);
            var parser      = new DomaSqlParser("select emp.id from emp order by emp.id option (maxrecursion 0)");
            var node        = transformer.Transform(parser.Parse());
            var parameters  = new List <ParameterEmulator>();
            var builder     = new DomaSqlBuilder(node, parameters, _config);
            var result      = builder.Build();

            result.ParsedSql.Is(expected);
        }
Example #2
0
        internal override ISqlNode ToPagingSqlNode(ISqlNode node, long offset, long limit, string rowNumberColumn)
        {
            var transformer = new MssqlPagingTransformer(offset, limit, _pagingForceOffsetFetch, rowNumberColumn);

            return(transformer.Transform(node));
        }