public SqlObject GetValue(int columnOffset, RowId rowid) { if (rowid.ToInt64() != 0) throw new ArgumentOutOfRangeException("rowid"); return values[columnOffset]; }
public TableRow GetRow(RowId rowid) { if (rowid.ToInt64() != 0) throw new ArgumentOutOfRangeException("rowid"); if (row == null) { row = new TableRow(this, new RowId(0)); for (int i = 0; i < columns.Count; i++) row.SetValue(i, values[i]); } return row; }
public TableRow GetRow(RowId rowid) { // Null value if the rowid is less than 0 if (rowid == null || rowid.ToInt64() < 0) return null; int sz = Columns.Count; TableRow row = new TableRow(this, rowid); for (int i = 0; i < sz; i++) { int tableIndex = columns.IndexOfTable(i); // Adjust the column to the table the column is located int tableColumn = columns.AdjustColumn(i); // Adjust the row by the table RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex); // Fetch and return the data SqlObject value = tables[tableIndex].GetValue(tableColumn, tableRow); TableColumn column = Columns[i]; row.SetValue(column.Offset, value); } return row; }
public bool RowExists(RowId rowid) { return rowid.ToInt64() == 0; }
public TableRow GetRow(RowId rowid) { if (rowid.ToInt64() != 0) return null; return currentRow; }
public void Delete(RowId rowid) { if (rowid.ToInt64() != 0) throw new ArgumentException(); queryString = null; parameters.Clear(); currentRow = null; rowCount--; }
public SqlObject GetValue(int columnOffset, RowId rowid) { int tableIndex = columns.IndexOfTable(columnOffset); // Adjust the column to the table the column is located int tableColumn = columns.AdjustColumn(columnOffset); // Adjust the row by the table RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex); // Fetch and return the data return tables[tableIndex].GetValue(tableColumn, tableRow); }
public bool RowExists(RowId rowid) { return rowid.ToInt64() > 0 && rowid.ToInt64() < RowCount; }
public void PrefetchValue(int columnOffset, RowId rowid) { if (rowid == null || rowid.ToInt64() < 0) return; if (columnOffset == -1) { for (int i = 0; i < tables.Length; ++i) { tables[i].PrefetchValue(-1, AdjustRow(rowid.ToInt64(), i)); } } else { int tableIndex = columns.IndexOfTable(columnOffset); // Adjust the column to the table the column is located int tableColumn = columns.AdjustColumn(columnOffset); // Adjust the row by the table RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex); // Delegate the hint to the parent table tables[tableIndex].PrefetchValue(tableColumn, tableRow); } }