json-db 0.1.2

Simple library for a document database saved on disk
Documentation
  • Coverage
  • 87.5%
    7 out of 8 items documented7 out of 7 items with examples
  • Size
  • Source code size: 20.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SamuelFischerCode

json-db

Simple library for a document database saved on disk

Usage

let db = JsonDB::init("your db name")?;

// Create a collection
db.create_collection("your collection path")?;

// Write data to a document in a collection
db.write("your collection path", "your document", "struct that implements serde::Serialize")?;

// Read data from a document in a collection
let data: impl serde::Deserialize = db.read("your collection path", "your document")?;

// Delete document in a collection
db.delete("your collection path", "your document")?;

// List all document in a collection
let list: Vec<String> = db.list("your collection path")?