Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporal tables - query part #25060

Merged
merged 1 commit into from
Jul 13, 2021
Merged

temporal tables - query part #25060

merged 1 commit into from
Jul 13, 2021

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Jun 8, 2021

  • query apis for temporal operations
  • query root creator service that can now construct query root expressions in nav expansion

tests for now are simply converted exisiting tests

  • used the original model & data
  • map entities to temporal in the model configuration
  • modify the data (remove or change values),
  • manually change the history table to make history deterministic (rather than based on current date),
  • added visitor to inject temporal operation to every query, which "time travels" to before the modifications above were made, so we should still get the same results as non-temporal & not modified data

@maumar
Copy link
Contributor Author

maumar commented Jun 8, 2021

for now we still project temporal columns - I added the annotation to the model to filter them out, but hit a bunch of issues in the shaper etc, where we are expecting certain number of columns in the reader, which all need to be tested and fixed. So decided to do the easy thing now to get the query design in place and when thats done, handle the part that removes period columns from query


};

foreach (var historyTableInfo in historyTableInfos)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will get some sort of helper for this to DRY

@maumar maumar force-pushed the temporal_query_draft branch 2 times, most recently from 6383d70 to 1463926 Compare July 7, 2021 22:51
@maumar
Copy link
Contributor Author

maumar commented Jul 7, 2021

new version up @smitpatel

@maumar maumar force-pushed the temporal_query_draft branch from 1463926 to ad1e18d Compare July 7, 2021 23:21
@smitpatel
Copy link
Contributor

Looks good, few minor comments. API review will check naming of things.

@maumar maumar force-pushed the temporal_query_draft branch from ad1e18d to 1c4d4f8 Compare July 12, 2021 16:05
@maumar maumar force-pushed the temporal_query_draft branch from 1c4d4f8 to 504b9ac Compare July 12, 2021 18:21
@maumar maumar marked this pull request as ready for review July 12, 2021 18:21
@maumar maumar force-pushed the temporal_query_draft branch from 504b9ac to 2ca8a45 Compare July 12, 2021 19:13
- query apis for temporal operations
- query root creator service that can now construct query root expressions in nav expansion

tests for now are simply converted exisiting tests
- used the original model & data
- map entities to temporal in the model configuration
- modify the data (remove or change values),
- manually change the history table to make history deterministic (rather than based on current date),
- added visitor to inject temporal operation to every query, which "time travels" to before the modifications above were made, so we should still get the same results as non-temporal & not modified data
@maumar maumar force-pushed the temporal_query_draft branch from 2ca8a45 to 4b25a88 Compare July 13, 2021 07:52
@maumar maumar merged commit 4b25a88 into main Jul 13, 2021
@maumar maumar deleted the temporal_query_draft branch July 13, 2021 07:53
DateTime pointInTime)
where TEntity : class
{
Check.NotNull(source, nameof(source));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all temporal extensions are on DbSet<TEntity> instead of IQueryable<TEntity>?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because these apply to a table in the database, which is represented by a DbSet, and not on any arbitrary IQueryable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants