Hiruna Jayamanne

A library that lets you use SQLite as a NoSQL JSON document store.

NoSQLite is a library that allows you to benefit from the stable and performant SQLite database but with a NoSQL-like JSON-based API which uses SQLite's json1 extension.


  • Insert JSON objects.
  • Get and remove JSON objects by primary key.
  • Iterate through multiple entries in a table.
  • Filter and Sort the entries by using the fields in a JSON object or columns in the SQL table.
  • Get only the primary key, JSON object, or specific field(s) from the JSON object.
  • Set, insert, replace, and remove fields in a JSON object.
  • 'Patch' JSON objects with other JSON objects.


struct User {
	name: String,
	age: u8,

fn main() {
	let connection = Connection::in_memory().unwrap();
	let table = connection.table("people").unwrap();
	table.insert(&User{ name: "Hiruna".into(), age: 18 }, &connection).unwrap();
	table.insert(&User{ name: "Bob".into(),  age: 13 }, &connection).unwrap();
	table.insert(&User{ name: "Callum".into(), age: 25 }, &connection).unwrap();
	table.insert(&User{ name: "Alex".into(), age: 20 }, &connection).unwrap();
	// Iterate over the entries in the table
		// Sort by Age
		// Only get people who are 18+
		// Gets the name and age fields of the JSON object
		.fields::<(String, u8), _, _, _>(&["name", "age"], &connection)
		.for_each(|(name, age)| println!("{:10} : {}", name, age));