Beispiel #1
0
        public async Task LimitWithTotal()
        {
            var limited = new LimitedTable(left, -1, 2);

            Assert.Equal(2, limited.RowCount);
            Assert.Equal(3, limited.TableInfo.Columns.Count);

            var value1 = await limited.GetValueAsync(0, 0);

            var value2 = await limited.GetValueAsync(0, 1);

            Assert.Equal(SqlObject.Integer(23), value1);
            Assert.Equal(SqlObject.Boolean(true), value2);
        }
Beispiel #2
0
        public async Task LimitWithOffsetAndTotal()
        {
            var limited = new LimitedTable(left, 1, 1);

            Assert.Equal(1, limited.RowCount);
            Assert.Equal(3, limited.TableInfo.Columns.Count);

            var value1 = await limited.GetValueAsync(0, 0);

            var value2 = await limited.GetValueAsync(0, 1);

            Assert.Equal(SqlObject.Integer(54), value1);
            Assert.Equal(SqlObject.Boolean(null), value2);
        }