EntityStateHistoryView<
T> =T&StateEntityHistoryColumns
View type for entity history (read-only).
This type combines your entity properties with historical tracking columns, allowing you to see how entities evolved over time through different change sets.
History views are read-only and include change tracking information like change_id, change_set_id, and depth for blame functionality.
// Define a history view type for key-value entities
type KeyValueHistoryView = EntityStateHistoryView<KeyValue>;
// Query entity state at a specific commit
await lix.db
.selectFrom("key_value_history")
.where("lixcol_commit_id", "=", commitId)
.where("lixcol_depth", "=", 0)
.selectAll()
.execute();| Type Parameter |
|---|
T |