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

Query all #54

Merged
merged 7 commits into from
Mar 12, 2019
Merged

Query all #54

merged 7 commits into from
Mar 12, 2019

Conversation

SimonLab
Copy link
Member

@SimonLab SimonLab commented Mar 6, 2019

ref: #40

This PR is based on #50 (thanks @RobStallion , it's much easier to have a common base 👍 )

When Repo.all(query) is called we need to

  • order the elements of the query by inserted_at value
  • add "distinct on" the entry_id to make sure to get the latest version of the item
  • Then with the two added points above, create a subquery and select only the element of these subquery which are not deleted

@SimonLab SimonLab self-assigned this Mar 6, 2019
@RobStallion
Copy link
Member

@SimonLab this is looking really good 👍

@SimonLab SimonLab changed the base branch from master to adapter March 11, 2019 14:32
lib/alog/connection.ex Outdated Show resolved Hide resolved
@Danwhy Danwhy merged commit fd63ef5 into adapter Mar 12, 2019
@Danwhy Danwhy deleted the query-all branch March 12, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants