#Can you use tauri_plugin_sql to retrieve data in rust?
8 messages · Page 1 of 1 (latest)
The plugin has no Rust api at the moment but you can use rusqlite or sqlx to do it. The plugin uses sqlx so you could re-use the plugin's connection if you chose that one but you don't gain much compared to just opening another connection 🤷
Thanks. Is it overkill to check a pin code via rust or is it safe enough to do it via svelte, as I have now? It's not that sensitive data.
hmm idk i always prefer doing stuff in rust so i may be a bit biased. Still, is it user initiated? Like does the user enter a pin that you compare to the pin in the db or something? Like, if part of this is on the js side then it doesn't really matter much if where you do the sql query itself imo
"does the user enter a pin that you compare to the pin in the db or something" Yes.
Try this plugin
https://crates.io/crates/tauri-plugin-rusqlite2/