Пример #1
0
        public void testLimitOnly()
        {
            var expected =
                "select * from ( select temp_.*, rownum esp_rownumber_ from ( select * from emp order by emp.id ) temp_ ) where esp_rownumber_ <= 10";
            var transformer = new OraclePagingTransformer(-1, 10, null);
            var parser      = new DomaSqlParser("select * from emp order by emp.id");
            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);
        }
        internal override ISqlNode ToPagingSqlNode(ISqlNode node, long offset, long limit, string rowNumberColumn)
        {
            var transformer = new OraclePagingTransformer(offset, limit, rowNumberColumn);

            return(transformer.Transform(node));
        }