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 have an app that on startup tries to connect to the last used db. If that errors it opens a dialog and asks the user to choose the appropriate sqlite db file.
What should not happen in this case is what seems to happen when using sqlx via tauri-plugin-sql-api (and what some other use-cases need): When connecting to a non-existing sqlite file this file is created.
That is dangerous as suddenly multiple versions of the db file could exist. And some contain no data...
better-sqlite3 for instance allowes passing a fileMustExist option when connecting. If missing, the connection will fail with an appropriate error.
Did I miss that this currently is possible? Or may I request this feature?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have an app that on startup tries to connect to the last used db. If that errors it opens a dialog and asks the user to choose the appropriate sqlite db file.
What should not happen in this case is what seems to happen when using sqlx via tauri-plugin-sql-api (and what some other use-cases need): When connecting to a non-existing sqlite file this file is created.
That is dangerous as suddenly multiple versions of the db file could exist. And some contain no data...
better-sqlite3 for instance allowes passing a
fileMustExist
option when connecting. If missing, the connection will fail with an appropriate error.Did I miss that this currently is possible? Or may I request this feature?
Beta Was this translation helpful? Give feedback.
All reactions