-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18bdfda
commit 4a7cc10
Showing
32 changed files
with
301 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
4a7cc10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time Machine in Charting!
This change added the feature of making charts on database changes using Time Machine.
It's easier to understand with an example: You have an Order entity, or any other transactional or master entity that can be modified. One day you get a requirement to make a chart about the evolution of all theorders: The boss wants to see many orders we had on each state... every month to see hot it changed over time, this means that the same order should be counted in state "Ordered" for May 2024, but then in status "Shipped" in April 2024 and in any following month.
You could rebuild everything using some CQRS bullshit, but you have been doing normal UPDATES / DELETEs like a normal dev. Fortunately, you activated the time machine some months ago, so you have all the changes in the history table, so making this chart is a few clicks:
In the chart UI, if the table has system-versioning enabled a new Time Machine checkbox adds some new options:
With this new blue bar you can configure:
Then, in the charting configuration, you probably want to use the new [Time series] token in your horizontal axis.
In this case, look how we over estimated the TOP 20, while in reality there are only 3 values per photo (the count of Ordered, Shipped and Cancelled).
Of course, we are not making 327 queries to the database! Instead is doing a
SelectMany
with a Tabled-Value-Functioncalled
GetDatesInRange
.Oh! And you can also use Time Series from the Search Control!
Also, to make this chart I had to simulate the values in the history table I had to make some cool UnsafeUpdates, maybe is usefull for someone importing data...
That's it! Enjoy the coding.
4a7cc10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4a7cc10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature! 💯
4a7cc10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.