sqlx-crud icon indicating copy to clipboard operation
sqlx-crud copied to clipboard

in memory CRUD

Open elyase opened this issue 3 years ago • 2 comments

Hi is there a way to use the crate with sqlite memory? I was looking at create_table_from_entity but not sure how to combine it with sqlx-crud

elyase avatar Aug 28 '22 21:08 elyase

All of the doc tests I have in the code use the sqlite in memory database. Just start a sqlx connection.

SqlitePool::connect(":memory:")

treydempsey avatar Apr 07 '23 10:04 treydempsey

It looks like create_table_from_entity uses SeaORM. This project is designed to work with sqlx. I'm not familiar with SeaORM but if you can share the same sqlx connection pool between sqlx-crud and SeaORM then it should work fine.

treydempsey avatar Apr 07 '23 10:04 treydempsey