Decode a row for a table, producing a primary key. If the table has a specific column marked `#[primary_key]`, use that. If not, the BSATN for the entire row is used instead.
(BinaryReader reader, out object primaryKey)
| 255 | /// <param name="primaryKey"></param> |
| 256 | /// <returns></returns> |
| 257 | public Row Decode(BinaryReader reader, out object primaryKey) |
| 258 | { |
| 259 | var obj = DecodeValue(reader); |
| 260 | |
| 261 | // TODO(1.1): we should exhaustively check that GenericEqualityComparer works |
| 262 | // for all types that are allowed to be primary keys. |
| 263 | var primaryKey_ = GetPrimaryKey(obj); |
| 264 | primaryKey_ ??= obj; |
| 265 | primaryKey = primaryKey_; |
| 266 | |
| 267 | return obj; |
| 268 | } |
| 269 | |
| 270 | /// <summary> |
| 271 | /// Creates and returns a parsed table update for the current table. |
nothing calls this directly
no outgoing calls
no test coverage detected