refactor(sql): remove commented-out query function and clean up command registration

pull/2553/head
Huakun Shen 4 months ago
parent 30df3929f1
commit 49d9a38442
No known key found for this signature in database

@ -77,17 +77,3 @@ pub(crate) async fn select(
let db = instances.get(&db).ok_or(Error::DatabaseNotLoaded(db))?;
db.select(query, values).await
}
// #[command]
// pub(crate) async fn query(
// db_instances: State<'_, DbInstances>,
// db: String,
// query: String,
// values: Vec<JsonValue>,
// ) -> Result<Vec<IndexMap<String, JsonValue>>, crate::Error> {
// let instances = db_instances.0.read().await;
// let db = instances.get(&db).ok_or(Error::DatabaseNotLoaded(db))?;
// db.
// // db.select(query, values).await
// }

@ -140,9 +140,6 @@ impl Builder {
pub fn build<R: Runtime>(mut self) -> TauriPlugin<R, Option<PluginConfig>> {
PluginBuilder::<R, Option<PluginConfig>>::new("sql")
.invoke_handler(tauri::generate_handler![
#[cfg(feature = "sqlite")]
commands::load,
#[cfg(not(feature = "sqlite"))]
commands::load,
commands::execute,
commands::select,

Loading…
Cancel
Save