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

Implement diesel compatibility #318

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Implement diesel compatibility #318

merged 1 commit into from
Oct 12, 2023

Conversation

Kijewski
Copy link
Contributor

@Kijewski Kijewski commented Oct 8, 2023

This PR allows using CompactString as representation for diesel text columns.

@ParkMyCar
Copy link
Owner

Thank you for the PR! I'm going to release v0.8.0-beta, but we'll target to get trait impls for database crates in either a v0.8.0-beta.1 or just v0.8.0, all dependent on #304

@ParkMyCar
Copy link
Owner

Overall this looks good to me, what do you think about moving tests/diesel to examples/diesel though? Reason being, that's where all of our current examples of how to use optional features live.

Also thanks to @NobodyXu for giving this a once over!

// create and open a temporary database
let tempdir = tempdir()?;
let db_path = tempdir.path().join("compact_str.sqlite3");
let db_path = format_compact!("file://{}", db_path.to_str().unwrap());
Copy link
Owner

Choose a reason for hiding this comment

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

Love the use of the macro!

Verified

This commit was signed with the committer’s verified signature.
hhatto Hideo Hattori
This PR allows using CompactString as representation for
[diesel](https://diesel.rs/) text columns.
@Kijewski
Copy link
Contributor Author

what do you think about moving tests/diesel to examples/diesel though? Reason being, that's where all of our current examples of how to use optional features live.

I was not sure if how I am using diesel is best practice, and didn't want to call it an example because of that. But I guess it does not matter all that much. :) I move the code into examples and rebased the PR.

@ParkMyCar
Copy link
Owner

Fantastic, thanks @Kijewski!

@ParkMyCar ParkMyCar merged commit 34afd59 into ParkMyCar:main Oct 12, 2023
@Kijewski Kijewski deleted the pr-diesel branch October 12, 2023 16:09
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.

None yet

3 participants