Brendonovich / prisma-client-rust

Type-safe database access for Rust
https://prisma.brendonovich.dev
Apache License 2.0
1.75k stars 106 forks source link

Sqlite in-memory database #314

Closed kiryasolod closed 1 year ago

kiryasolod commented 1 year ago

Hello, dear developers! I want to use prisma-client-rust for my project and I need to create in-memory sqlite database for storing data. So I need to open it by using something like that:

let db = db_blueprint::PrismaClient::_builder().with_url(":memory:".to_string()).build().await.unwrap();

Then I neet to apply all the migrations to it. I have a 0_init migration with all the data I need, including all inserts. This is going to be a read-only in-memory database. Please help me to implement it. I'm getting the error that the url is invalid (I tried several options of url).

Also it's not clear to me how my tauri app will get migrations in release. So all migrations should be somehow embedded to the application bundle

Brendonovich commented 1 year ago

Discussing in Discord