Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
93 stars 13 forks source link

Butane + Warp example #9

Closed jackymao closed 2 years ago

jackymao commented 3 years ago

Hi @Electron100,

Is there a plan of an example that Butane works with Warp ?

I tried to work the getting started blog program with Warp but failed, meet 2 major problem:

I'm unable to solve this by myself. I would appreciate if you have plan on an example of Butane works with Warp in future.

Many thanks.

Best regards, Jacky

Electron100 commented 3 years ago

I haven't used Warp myself before (my own projects usually use Actix Web), but I'd certainly like Butane to be compatible with Warp, so I'll take a dive into this.

Once I fix up Many, I'll give Warp a a bit of a look.

jackymao commented 3 years ago

Indeed ForeignKey implemented Serialize/Deserialize. Sorry that I missed this and I should more carefully checking on this. I was add the #[derive(Serialize, Deserialize)] line above pub struct Post {, and get some hints by VSCode. But I have just retry and there is no warning about this now. It is my fault and really sorry about the wrong words on it.

Thank you for the advice on dyn BackendConnection, I will try butane::db::Connection and R2D2, I see there is a test r2r2.rs, I need to learn and getting understand how to work with it.

Appreciate that you'll work on the Many feature and will have a look on Warp in future. It's a great news. Actix Web is powerful, and I'm also quite love Warp. I would like to use Butane with Warp if possible.

Electron100 commented 3 years ago

I've published 0.4 which allows Serialize/Deserialize on Many. I haven't gotten to looking at Warp directly yet, but will try to do so in the next few days.