Skip to content

New iden paradigm #909

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

Merged
merged 17 commits into from
Jul 14, 2025
Merged

New iden paradigm #909

merged 17 commits into from
Jul 14, 2025

Conversation

tyt2y3
Copy link
Member

@tyt2y3 tyt2y3 commented Jul 12, 2025

As discussed, Arc, vtable tricks are removed.

The biggest behaviour change is late binding to early binding. previously the Iden is only rendered when the AST is being serialized, now that we pre-render it as we store that into the AST.

For majority of usecases in SeaORM though, since they're 'static str anyway, there should be no difference.

It is still possible to have struct MyIden(String) with some dynamic behaviour.

@Huliiiiii

@tyt2y3 tyt2y3 requested a review from Expurple July 12, 2025 11:06
@tyt2y3
Copy link
Member Author

tyt2y3 commented Jul 12, 2025

there is no way to read this code diff other than going commit by commit. every commit is compilable.

but summary of changes:

  1. change unquoted() signature (biggest visible breaking change)
image
  1. change quoted() signature
fn quoted(&self) -> Cow<'static, str> {
  1. removed prepare() from Iden trait (moved into builder backend)
  2. DynIden is just a Cow, SeaRc is just a helper
  3. impl IntoIden for String (most asked, I guess)

hopefully this can get optimized
Copy link
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

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

I love this

tyt2y3 and others added 4 commits July 14, 2025 12:24
@tyt2y3
Copy link
Member Author

tyt2y3 commented Jul 14, 2025

special thanks to @Huliiiiii for bringing forward the proposal!

@tyt2y3 tyt2y3 merged commit 7e95403 into master Jul 14, 2025
20 checks passed
@tyt2y3 tyt2y3 deleted the new-iden branch July 14, 2025 12:15
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.

2 participants