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

refactor to expose some utilities for Esqueleto #340

Merged
merged 4 commits into from
Mar 1, 2015

Conversation

albertov
Copy link
Contributor

Moved some functionality regarding composite/custom primary keys to an exposed module (perhaps it should be under an "Internal" folder?) so Esqueleto can reuse it. See prowdsponsor/esqueleto#87

@snoyberg
Copy link
Member

@gregwebs I'm guessing you want to review this.

@albertov
Copy link
Contributor Author

@meteficha: Yes, it seems equivalent to me too. I'll change it and seen if tests still pass.

@gregwebs
Copy link
Member

This looks fantastic, thanks!

@andrewthad
Copy link
Contributor

@gregwebs Could you merge this in? You might have to change the version number. I think that @albertov may have stalled on this, but I am going to see if I can at least get esqueleto to not fail with all tables that use CPKs. I'm not concerned at all about being able to use the Key definitions in queries, so I think I can solve this reasonably quickly if this branch gets in.

@albertov
Copy link
Contributor Author

@andrewthad take a look at this PR if you haven't already. I managed to to be able to use composite/non-id keys as filter conditions in queries/joins and return entities which contain composite/non-id keys.
I stalled on being able to return single keys (or as part of a tuple) since it requires some refactoring in Esqueleto as it was not designed to treat a column as a collection of them. I asked @meteficha for some guidance but haven't heard from him yet as I suppose he must be quite busy IRL.

@andrewthad
Copy link
Contributor

@albertov So do you think, even without that feature, that your branches are suitable to be merged in. Or, better put, my real question is: are any previously available features of esqueleto broken right now in your branch? If not, then I'd like to see it get merged in because there is value (namely, not crashing for entities with composite keys) in your branch that I would like to have available.

@albertov
Copy link
Contributor Author

@andrewthad, no, nothing was broken if i remember correctly. At least
according to the test

On Thursday, February 26, 2015, andrewthad [email protected] wrote:

@albertov https://github.com/albertov So do you think, even without
that feature, that your branches are suitable to be merged in. Or, better
put, my real question is: are any previously available features of
esqueleto broken right now in your branch? If not, then I'd like to see it
get merged in because there is value (namely, not crashing for entities
with composite keys) in your branch that I would like to have available.


Reply to this email directly or view it on GitHub
#340 (comment).

@gregwebs gregwebs merged commit 4a353d5 into yesodweb:master Mar 1, 2015
@gregwebs
Copy link
Member

gregwebs commented Mar 1, 2015

thanks for the reminder. This is on hackage now.

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