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

Upgrade SeaORM dependency to 0.10.x #89

Closed
1 of 3 tasks
billy1624 opened this issue Nov 3, 2022 · 10 comments · Fixed by #93
Closed
1 of 3 tasks

Upgrade SeaORM dependency to 0.10.x #89

billy1624 opened this issue Nov 3, 2022 · 10 comments · Fixed by #93
Assignees

Comments

@billy1624
Copy link
Member

billy1624 commented Nov 3, 2022

Motivation

SeaORM 0.10.x is released (chnagelog). We should upgrade SeaORM dependency on seaography side as well.

Tasks

  • Upgrade to SeaORM 0.10.x
  • Support Vec<T> for Postgres
  • Anything else...?
@Musbell
Copy link

Musbell commented Nov 4, 2022

Got this error while building a Docker image.

------
 > [cacher 3/3] RUN cargo chef cook --release --recipe-path recipe.json:
#17 1.318     Updating crates.io index
#17 218.3 error: failed to select a version for the requirement `sea-orm = "^0.9"`
#17 218.3 candidate versions found which didn't match: 0.8.0, 0.7.1, 0.7.0, ...
#17 218.3 location searched: crates.io index
#17 218.3 required by package `planta-api v0.0.1 (/app)`
#17 218.3 thread 'main' panicked at 'Exited with status code: 101', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cargo-chef-0.1.35/src/recipe.rs:145:27
#17 218.3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------

I believe upgrading the SeaORM dependency to 0.10.x will fix it.

@billy1624
Copy link
Member Author

Hey @Musbell, try upgrading your Rust to at least 1.60. SeaORM need Rust 1.60 to compile.

@Musbell
Copy link

Musbell commented Nov 4, 2022

Thanks, @billy1624 it worked : )

@karatakis karatakis self-assigned this Nov 7, 2022
@karatakis karatakis mentioned this issue Nov 7, 2022
1 task
@karatakis
Copy link
Collaborator

@billy1624 what do you mean by support Vec for PostgreSQL? Do you have an example ?

@tyt2y3
Copy link
Member

tyt2y3 commented Nov 7, 2022

I think Billy meant https://github.com/SeaQL/sea-orm/blob/master/tests/collection_tests.rs

Since this is a Postgres-only feature, may be we can think about it later, as I don't want to create hassle in Seaography for handling database-specific behaviour.

@karatakis
Copy link
Collaborator

In order to add new types we currently need to both https://github.com/SeaQL/seaography/blob/main/src/lib.rs#L146-L205 and https://github.com/SeaQL/seaography/blob/main/derive/src/filter.rs#L53-L81. This #87 will solve to maintain the list only on the first file. I merge the update for the moment and wait for more progress on other areas

@billy1624 billy1624 linked a pull request Nov 8, 2022 that will close this issue
1 task
@billy1624
Copy link
Member Author

billy1624 commented Nov 8, 2022

We can wait #87 resolved before considering the support of Vec<T> for Postgres.

But I imagine it's readonly and we won't support filtering operation that's specific to array column of Postgres.

I think all we have to do is just implement some trait on seaography side and enable the "postgres-array" feature on sea-orm and perhaps introduce "postgres-array" feature on seaography side as well

@billy1624
Copy link
Member Author

Okay, with #87 resolved now we can get back to this.

@karatakis
Copy link
Collaborator

This needs more work because of the Vec, I noticed this problem yesterday when I was trying to generate the postgres example

@karatakis
Copy link
Collaborator

karatakis commented Apr 2, 2023

This is update has been applied to the code base, but only #128 is needed, so I close this issue

@github-project-automation github-project-automation bot moved this from Triage to Done in SeaQL Dev Tracker Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants