You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it was possible to use this in a bin file with sqlx's postgres PgConnection? I'm getting and error with my current implementation.
I'm trying to create a script that will create my database, run movine init and movine fix, then seed the database with mock data.
fnmain() -> Result<()>{dotenv().ok();let database_url = dotenv::var("DATABASE_URL").expect("Missing database_url.");let pg_conn = block_on(init_database(&database_url))?;// this is what is returned// sqlx::postgres::PgConnection::connect(&database_url).await?letmut movine = Movine::new(&mut pg_conn);
movine.init()?;
movine.fix()?;// Seed DBOk(())}
the trait bound `PgConnection: DbAdaptor` is not satisfied
required because of the requirements on the impl of `DbAdaptor` for `&mut PgConnection`
required by `Movine::<T>::new`rustcE0277
let pg_conn: PgConnection
Go to PgConnection
BTW this is an awesome crate, great work 😃 It has been so easy using it so far!
The text was updated successfully, but these errors were encountered:
I'm a bit swamped, but happy to review a PR if you want to add it. It might be necessary to add feature gates for it if the types conflict (which is something I need to add regardless).
I was wondering if it was possible to use this in a bin file with sqlx's postgres
PgConnection
? I'm getting and error with my current implementation.I'm trying to create a script that will create my database, run
movine init
andmovine fix
, then seed the database with mock data.BTW this is an awesome crate, great work 😃 It has been so easy using it so far!
The text was updated successfully, but these errors were encountered: