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); }
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); }
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); }
public void Dispose() { table = null; }
public Enumerator(LimitedTable table) { this.table = table; }