Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Database queries with Diesel #192
Database queries with Diesel #192
Changes from 6 commits
3e85aa3
121204b
4ee670e
c62a807
0d418fa
5c9c727
644b4d1
ad7d5e1
ab3ab9e
b353504
39ed898
efe71ce
520411f
880ddd1
842314b
6b34785
fbb56a4
fcf5070
3731cf6
c31b87d
26beb65
ebcd219
3fa55e9
fa45743
1e2bbf0
3598f71
e715d2b
3ac603d
cacd6c2
a6dbbae
8f3f3da
e38f16e
318135f
50f8439
9714572
8c1a237
fda02c4
b570c9a
76ddf44
f6de7ca
330c82c
46548ed
c4c5f35
cc824a1
ed1f050
43fc587
e1baefc
6ce512c
c59c9fa
a68d4ba
654ccf6
f494e77
0b01683
de45714
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
this probably won't work out because in order to produce our
Error
, we need other info from context thatDieselError
can't give usThere 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.
Yeah, that might be okay - just means that we can define more featureful converters from
DieselError
toError
, depending on the type.I imagine that
NotFound
triggers more work for the caller to add context, and everything else is more-or-less passthrough.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.
I've gone ahead and updated these with two explicit constructions that provide enough context to pass all tests.
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.
This is great! Exactly what I was picturing, but I didn't know how to do it.
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.
comment this out because the table doesn't have a primary key and diesel doesn't like that. real solution would be to just give it a primary key