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

Merge/diesel dynamic schema #2478

Merged
merged 19 commits into from
Aug 19, 2020

Conversation

weiznich
Copy link
Member

@weiznich weiznich commented Aug 7, 2020

I propose merging diesel_dynamic_schema into the diesel main repository as this makes it much easier to coordinate the necessary changes between those two crates to implement dynamic select clause support.

sgrif and others added 14 commits May 23, 2018 09:27
The test for this feature is a bit wonky. This feature only matters for
PG, but I don't want to dick around with setting up test suites for
multiple backends on such a simple crate. Instead we can just test the
generated SQL directly.
Allow specifying schema names other than the default
* Add documentation with examples

* Hide example code

Co-Authored-By: Georg Semmler <[email protected]>

* Hide test code

Co-Authored-By: Georg Semmler <[email protected]>

* Destructure results

Co-Authored-By: Georg Semmler <[email protected]>

* Destructure results

Co-Authored-By: Georg Semmler <[email protected]>

* Reword help because of upcoming new functionality

* Reword comment to make it simpler

* Reword help to omit imprecise arguments

* Fix examples with destructuring

* Reword help to focus on core idea

* Rework help to add links

* Rework help example to add asserts
@weiznich weiznich requested a review from a team August 7, 2020 22:09
@weiznich weiznich force-pushed the merge/diesel_dynamic_schema branch from eb404b5 to 79f4190 Compare August 7, 2020 22:59
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Hi, it looks good to me. I did the tests and all seem to pass, which is great. I added a suggestion to remove a clippy warning too.

I also noticed that in the Cargo.toml file, the diesel dependency is shown as 1.0.0, but in the rest of the crates in the workspace, it's shown like this:

[dependencies.diesel]
version = "~2.0.0"
path = "../diesel"
default-features = false

Should this be changed?

Finally, as far as I can tell this does not include the changes in diesel-rs/diesel-dynamic-schema#10, right? That would personally be a really nice feature to have. I've been trying to make it work with the latest 2.0.0 diesel branch, but I'm too far from understanding the inner workings of diesel to make it compile.

In any case, this looks pretty good from my side. Let me know if there is something else I should be looking at :)

diesel_dynamic_schema/src/column.rs Outdated Show resolved Hide resolved
@weiznich
Copy link
Member Author

@Razican Thanks for the review. I will try to address the open points after my holidays (so not for before September).

I also noticed that in the Cargo.toml file, the diesel dependency is shown as 1.0.0, but in the rest of the crates in the workspace, it's shown like this:

Good point. Can you add some comment in the corresponding Cargo.toml?

Finally, as far as I can tell this does not include the changes in diesel-rs/diesel-dynamic-schema#10, right? That would personally be a really nice feature to have. I've been trying to make it work with the latest 2.0.0 diesel branch, but I'm too far from understanding the inner workings of diesel to make it compile.

That's intentionally as I first want to merge both repositories. After that we can start adding new features. I will likely do a followup PR with those changes later.

@weiznich weiznich merged commit 44d0096 into diesel-rs:master Aug 19, 2020
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