-
-
Notifications
You must be signed in to change notification settings - Fork 398
Sea ORM 2.0 #1698
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
Open
elcoosp
wants to merge
10
commits into
loco-rs:master
Choose a base branch
from
elcoosp:feat/sea-orm-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sea ORM 2.0 #1698
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Can you point me to the sea-query patch needed? I'll prioritize it |
Contributor
|
Waht do you mean? |
I meant this @elcoosp |
Author
Contributor
|
excited for this update! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR migrates Loco.rs from SeaORM 1.x to SeaORM 2.0, including all necessary code updates and dependency changes to support the new version.
Changes
1. Dependency Updates
sea-ormfrom1.1.0to2.0.0-rc.19sea-orm-migrationfrom1.0.0to2.0.0-rc.19sea-queryto use a custom git repository during migration2. Query DSL Module Refactor
IntoConditionimplementation forConditionBuilderFrom<ConditionBuilder> for ConditionimplementationConditionBuilderto beClonebuild()method to returnConditiondirectly3. Database Schema Migration
query_one_rawinstead ofquery_oneunimplemented!()fallbacks4. Database Operations
query_onewithquery_one_rawacross the codebaseexecutecalls toexecute_rawfor schema operations5. Iden Trait Implementation
Idenimplementation for theLocoenum to match SeaORM 2.0 API changesunquotedmethod signature to return&strinstead of writing to a formatter6. Middleware Updates
TimeoutLayer::with_status_codeStatusCode::from_u16for status code creation7. Template Updates
Cargo.tomlfiles to use SeaORM 2.0Breaking Changes Addressed
SeaORM 2.0 API Changes:
query_one()→query_one_raw()execute()→execute_raw()(for schema operations)Iden::unquoted()signature changeIntoConditiontrait in favor ofFromtraitCondition Building:
Database Operations:
Testing
Notes
sea-querypatch is used to address immediate compatibility issuesNext Steps
sea-querypatch once upstream issues are resolvedThis migration ensures Loco.rs remains compatible with the latest SeaORM version while maintaining all existing functionality.