Repository navigation
Aligning IdenStatic with its counterpart in SeaQuery - #1267
Merged
billy1624 merged 2 commits intoJan 12, 2023
Merged
Conversation
billy1624
commented
Nov 30, 2022
| pub trait IdenStatic: Iden + Copy + 'static { | ||
| /// Method to call to get the static string identity | ||
| fn as_str(&self) -> &str; | ||
| fn as_str(&self) -> &'static str; |
Member
Author
There was a problem hiding this comment.
If we make this returns static reference, it'd be a massive breaking change 3cca57f
Member
There was a problem hiding this comment.
Only if someone is using an ArrayString inside a custom Entity definition.
Member
Author
There was a problem hiding this comment.
User with compact entity won't be affected as well
Member
There was a problem hiding this comment.
Only if someone is using an ArrayString inside a custom Entity definition.
Which I don't think someone had actually done that. So I am okay to this breaking change.
billy1624
commented
Nov 30, 2022
| impl sea_orm::IdenStatic for #ident { | ||
| fn as_str(&self) -> &str { | ||
| fn as_str(&self) -> &'static str { | ||
| <Self as sea_orm::EntityName>::table_name(self) |
Member
Author
There was a problem hiding this comment.
Return type of table_name was being changed because of this @tyt2y3
billy1624
marked this pull request as ready for review
January 12, 2023 05:15
billy1624
changed the base branch from
master
to
replace-columntype-n-idenstatic
January 12, 2023 05:15
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
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.
PR Info
Breaking Changes
IdenStaticno longer withDebugbound