tauri-plugin-mongoose 0.2.8

Tauri plugin for MongoDB/Mongoose-like database operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tauri::{
    plugin::{Builder, TauriPlugin},
    Runtime,
};

pub mod db;
mod commands;

pub use db::{connect_to_db, get_client, is_connected, create_document, get_document_by_id, set_db_name, get_db_name, get_all_users, get_user_by_name, create_user};

pub fn init<R: Runtime>() -> TauriPlugin<R> {
    Builder::new("mongoose")
        .invoke_handler(tauri::generate_handler![commands::connect, commands::create, commands::get_by_id, commands::get_users, commands::get_user, commands::create_db_user])
        .build()
}