#Managing SQLite connections in Tauri

2 messages · Page 1 of 1 (latest)

spark mantle
#

I’ve got a SQLite database hooked up to my app with rusqlite. I have a bunch of tauri::command functions that involve interfacing with this database. Currently, I execute all statements on a single rusqlite::Connection (wrapped in a parking_lot::Mutex) and use tauri::State to manage it. Is this better than simply creating a new database connection for each command invocation? What are the advantages and disadvantages? Thanks!

sharp elk