Esempio n. 1
0
        public async Task EnumerateLimited()
        {
            var limited = new LimitedTable(left, -1, 2);

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

            var row1 = limited.First();

            var value1 = await row1.GetValueAsync("a");

            Assert.Equal(SqlObject.Integer(23), value1);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 public void Dispose()
 {
     table = null;
 }
Esempio n. 5
0
 public Enumerator(LimitedTable table)
 {
     this.table = table;
 }