Skip to content

Commit

Permalink
Include Internal Row ID with DbCellValue (#308)
Browse files Browse the repository at this point in the history
Update to include the Row ID with a DbCellValue. This will be super useful to us for the purposes of managing individual rows via slick grid.

Although this changes the API for edit/subset and query/subset, it is effectively backwards compatible since it's adding a parameter, not removing anything.

* New DbCellValue has an internal Row ID

* Adding unit tests
  • Loading branch information
benrr101 committed Apr 17, 2017
1 parent 88eb0f6 commit 96d46b5
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public class DbCellValue
/// </summary>
internal object RawObject { get; set; }

/// <summary>
/// The internal ID for the row. Should be used when directly referencing the row for edit
/// or other purposes.
/// </summary>
public long RowId { get; set; }

/// <summary>
/// Copies the values of this DbCellValue into another DbCellValue (or child object)
/// </summary>
Expand All @@ -38,6 +44,7 @@ public virtual void CopyTo(DbCellValue other)
other.DisplayValue = DisplayValue;
other.IsNull = IsNull;
other.RawObject = RawObject;
other.RowId = RowId;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage
/// </summary>
public interface IFileStreamReader : IDisposable
{
IList<DbCellValue> ReadRow(long offset, IEnumerable<DbColumnWrapper> columns);
IList<DbCellValue> ReadRow(long offset, long rowId, IEnumerable<DbColumnWrapper> columns);
}
}
Loading

0 comments on commit 96d46b5

Please sign in to comment.