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

Disable incremental counts & add support for returning 0 in multi-result queries #33

Merged
merged 14 commits into from
Oct 30, 2019

Conversation

ekigamba
Copy link
Contributor

@ekigamba ekigamba commented Aug 14, 2019

Fixes #15

Also resolves #32

Try and also solve the issue in #34

…ults

- Add exectedIndicators property for Multi-Result Indicator queries
- Add migrations to add column for exected_indicators in indicator_queries table
- Add sample multi-result query with expected_indicators
- Enable reading the expected_indicators fields and saving it
- Enable processing multi-result in case expectedIndicators have been defined and providing the expected output only

Fixes #32
…ti-result queries

- Break the previous functionality where multi-result data is edited before saving
- Add tests for the new functionality

The current functionality checks the retrieved multi-result data and
compares it with the registered expectedIndicators

Fixes #32
1. Check if there are multiple indicator tallies for a single day
2. Rewrite all values into the same table when the multiple indicator tallies are summed up
- Change date format for queries to Y-m-d from Y-m-d h:m:s
- Perform queries every time the job runs and no only when a new event has been registered since the last event recorded
- Save IndicatorTally date as Y-m-d for easy overwriting and queries

Fixes #15
@ekigamba ekigamba changed the title Disable incremental counts Disable incremental counts & add support for returning 0 in multi-result queries Aug 15, 2019
@ekigamba ekigamba force-pushed the issue/15-disable-incremental-counts branch from 79b1c07 to 1810d6f Compare August 15, 2019 08:21
@ekigamba ekigamba force-pushed the issue/15-disable-incremental-counts branch 2 times, most recently from aa009f2 to 8460df1 Compare August 15, 2019 12:00
@ekigamba ekigamba force-pushed the issue/15-disable-incremental-counts branch from 8460df1 to 01152f7 Compare August 15, 2019 12:27
@ekigamba ekigamba requested a review from allan-on August 19, 2019 09:28
@ekigamba
Copy link
Contributor Author

BLOCKED Waiting for #22

@ekigamba ekigamba removed the BLOCKED label Aug 23, 2019
Comment on lines 390 to 391
public static void aggregateDailyTallies(@NonNull SQLiteDatabase database) {
// Code to migrate the code over from incremental tallies should be written here
Copy link
Contributor

Choose a reason for hiding this comment

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

@ekigamba
Copy link
Contributor Author

ekigamba commented Oct 25, 2019 via email

@ekigamba ekigamba force-pushed the issue/15-disable-incremental-counts branch from bd24498 to e853012 Compare October 28, 2019 08:19
@ekigamba ekigamba force-pushed the issue/15-disable-incremental-counts branch from a8bb84f to b8c43e1 Compare October 28, 2019 11:51
Copy link
Contributor

@allan-on allan-on left a comment

Choose a reason for hiding this comment

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

Migrations fixed and work as expected. Looks good to me

@ekigamba ekigamba merged commit 6b02a23 into master Oct 30, 2019
@ekigamba ekigamba deleted the issue/15-disable-incremental-counts branch October 30, 2019 07:51
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.

Add support for returning 0 for no result in multi-result queries Disable incremental counts
2 participants