Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

UnQLite wrapper 1.0 is avaliable for Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

zitsen/unqlite.rs

Repository files navigation

A high-level UnQLite database engine wrapper.

travis-badgerelease-badgedownloadsdocs-badgelicense-badge

NOTE: Some of the documents is stolen fromUnQLite Official Website.

What is UnQLite?

UnQLite is a software library which implements aself-contained,serverless,zero-configuration, transactional NoSQL database engine. UnQLite is a document store databasesimilar to [MongoDB], [Redis], [CouchDB] etc. as well a standard Key/Value store similar to[BerkeleyDB], [LevelDB], etc.

UnQLite is an embedded NoSQL (Key/Value store and Document-store) database engine. Unlike mostother NoSQL databases, UnQLite does not have a separate server process. UnQLite reads andwrites directly to ordinary disk files. A complete database with multiple collections, iscontained ina single disk file. The database file format is cross-platform, you can freelycopy a database between 32-bit and 64-bit systems or between big-endian and little-endianarchitectures.

Port to Rust

This crate is high-level UnQLite database wrapper for Rust. A low-level bindings wrapperis available as a seperated crate:unqlite-sys.

Usage

You can start withUnQLite constructors:

externcrate unqlite;use unqlite::{UnQLite,Config,KV,Cursor};fnmain(){// The database memory is not handled by Rust, and the database is on-disk,// so `mut` is not neccessary.let unqlite =UnQLite::create_temp();// Use any type that can use as `[u8]`    unqlite.kv_store("key","a long length value").unwrap();    unqlite.kv_store("abc",[1,2,3]).unwrap();letmut entry = unqlite.first();// Iterate recordsloop{if entry.is_none(){break;}let record = entry.expect("valid entry");let(key, value) = record.key_value();println!("* Go through {:?} --> {:?}", key, value);if value.len() >10{println!("** Delete key {:?} by value length", key);            entry = record.delete();}else{            entry = record.next();}}//panic!("for test");}

Contributors

  • @bemyak
  • @chritchens
  • @wolandr
  • @timlyo
  • @dariusc93

About

UnQLite wrapper 1.0 is avaliable for Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp