Crates.io | Alice-Database_DBMS |
lib.rs | Alice-Database_DBMS |
version | 1.2.3 |
source | src |
created_at | 2024-10-23 14:51:46.047521 |
updated_at | 2024-10-26 09:15:37.183856 |
description | The Alice-Database is a comprehensive data management solution designed to integrate seamlessly with the Kingdom System. This plugin provides robust functionality for creating, updating, and deleting collections and documents, ensuring efficient and reliable data storage and retrieva |
homepage | https://github.com/0xBLCKLPTN/Kingdom-System |
repository | https://github.com/0xBLCKLPTN/Kingdom-System/tree/main/Plugins/Alice-Database |
max_upload_size | |
id | 1420245 |
size | 95,050 |
To set up Alice DBMS, ensure you have Rust and Cargo installed. You can then add it to your project by including it in your Cargo.toml
.
[dependencies]
Alice-Database_DBMS = "=0.1.0"
Then, run:
cargo build
Here's a brief example of how to use the Alice DBMS module:
fn main() -> std::io::Result<()> {
// Define the root path for data storage
let root_path = Path::new("path_to_your_database");
let mut manager = CollectionManager::new(&root_path);
// Add a new collection
manager.add_collection("example_collection").unwrap();
// Prepare document content
let doc_content = json!({"key": "value"}).to_string();
// Add a new document to the collection
manager.get_collection_mut("example_collection").unwrap()
.add_document("example_doc.json", &doc_content).unwrap();
println!("Document added successfully!");
Ok(())
}
Alice DBMS comes with a suite of tests to ensure functionality. You can run the tests using:
cargo test
These tests cover the creation, updating, and deletion of documents and collections. For example:
#[test]
fn test_create_and_add_document() {
// Test implementation here...
}
Contributions are welcome! Hereβs how you can help:
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please reach out to blcklptn@icloud.com.
Happy coding with Alice DBMS! π