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

Support sea-orm #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Support sea-orm #22

wants to merge 1 commit into from

Conversation

Kunduin
Copy link

@Kunduin Kunduin commented Mar 13, 2025

Hi~ This PR includes the necessary support for sea-orm, and the following syntax will now be accepted by the compiler.

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "test_book")]
pub struct Model {
	#[sea_orm(primary_key)]
	pub id: FastStr,
}

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2025

CLA assistant check
All committers have signed the CLA.


impl sea_orm::TryFromU64 for FastStr {
fn try_from_u64(value: u64) -> Result<Self, sea_orm::DbErr> {
Ok(FastStr::from_string(value.to_string()))
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use FastStr::new with itoa with is more performant here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants