Odonno / surrealdb-migrations

An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.
https://crates.io/crates/surrealdb-migrations
MIT License
226 stars 19 forks source link

Support Surreal<Client> #33

Closed Keyruu closed 1 year ago

Keyruu commented 1 year ago

I wanted to try out the library but I use the Surreal Client which isn't supported as it seems. I just create a client like this:

let db = Surreal::new::<Ws>("127.0.0.1:8001")
        .await
        .expect("Failed to connect to server");

But the MigrationRunner expects a &Surreal<surrealdb::engine::any::Any>

This is the error I get:

mismatched types
expected reference `&Surreal<surrealdb::engine::any::Any>`
   found reference `&Surreal<Client>`
Odonno commented 1 year ago

Hi Lucas,

You're right. It was convenient to only use the Any engine but the lib should allow any type of engine/connection.

Odonno commented 1 year ago

This is now released in the v0.9.7

Odonno commented 1 year ago

@all-contributors please add @Keyruu for ideas

allcontributors[bot] commented 1 year ago

@Odonno

We had trouble processing your request. Please try again later.

Keyruu commented 1 year ago

Thank you!