All Projects → andymatuschak → react-native-leveldown

andymatuschak / react-native-leveldown

Licence: MIT license
Native bindings to LevelDB for React Native, exposed as leveldown-compatible interface

Programming Languages

java
68154 projects - #9 most used programming language
Objective-C++
1391 projects
typescript
32286 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language
javascript
184084 projects - #8 most used programming language
Starlark
911 projects

Projects that are alternatives of or similar to react-native-leveldown

leveldb-cli
CLI for LevelDB
Stars: ✭ 86 (+290.91%)
Mutual labels:  leveldb
leveldb-jna
Java JNA (not JNI) adapter for LevelDB
Stars: ✭ 21 (-4.55%)
Mutual labels:  leveldb
papyruscs
PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Stars: ✭ 221 (+904.55%)
Mutual labels:  leveldb
IronLeveldb
A leveldb implementation in C#
Stars: ✭ 25 (+13.64%)
Mutual labels:  leveldb
LevelDbOneTab
LevelDbOneTab
Stars: ✭ 20 (-9.09%)
Mutual labels:  leveldb
indexd
An external bitcoind index management service module
Stars: ✭ 50 (+127.27%)
Mutual labels:  leveldb
Cphalcon7
Dao7 - Web framework for PHP7.x,项目接洽 QQ 176013762
Stars: ✭ 237 (+977.27%)
Mutual labels:  leveldb
papyrusjs
papyrus.js renders maps of Minecraft: Bedrock Edition worlds using node.js, LevelDB and leaflet.
Stars: ✭ 53 (+140.91%)
Mutual labels:  leveldb
rippledb
Embeddable key-value database engine in pure TypeScript, based on LSM-Tree
Stars: ✭ 33 (+50%)
Mutual labels:  leveldb
dreamy-db
🔥 Dreamy-db - A Powerful database for storing, accessing, and managing multiple database.
Stars: ✭ 25 (+13.64%)
Mutual labels:  leveldb
ssdb
SSDB - A fast NoSQL database, an alternative to Redis
Stars: ✭ 8,026 (+36381.82%)
Mutual labels:  leveldb
pgrocks-fdw
Bring RocksDB to PostgreSQL as an extension. It is the first foreign data wrapper (FDW) that introduces LSM-tree into PostgreSQL. The underneath storage engine can be RocksDB. The FDW also serves for VidarDB engine, a versatile storage engine for various workloads. See the link for more info about VidarDB engine.
Stars: ✭ 101 (+359.09%)
Mutual labels:  leveldb
electron-react-ts-rxdb-realm-sqlite
Demo of Native Databases with Electron and ReactJS. Realm, SQLite and RxDB ( with LevelDB/IndexedDB/InMemory adapters)
Stars: ✭ 27 (+22.73%)
Mutual labels:  leveldb
JukeboxMC
A Minecraft Bedrock Editon Server Software
Stars: ✭ 56 (+154.55%)
Mutual labels:  leveldb
pouchy
A simple, opinionated interface for PouchDB 👝
Stars: ✭ 59 (+168.18%)
Mutual labels:  leveldb
Mongols
C++ high performance networking with TCP/UDP/RESP/HTTP/WebSocket protocols
Stars: ✭ 250 (+1036.36%)
Mutual labels:  leveldb
universal-progressive-todos
A Todo list with universal JavaScript & Progressive Enhancement
Stars: ✭ 30 (+36.36%)
Mutual labels:  leveldb
LevelDBDumper
Dumps all of the Key/Value pairs from a LevelDB database
Stars: ✭ 23 (+4.55%)
Mutual labels:  leveldb
lua-leveldb
Lua bindings for google's leveldb library.
Stars: ✭ 50 (+127.27%)
Mutual labels:  leveldb
utxodump
dump bitcoin utxo data
Stars: ✭ 17 (-22.73%)
Mutual labels:  leveldb

Archival notice

I'm archiving and deprecating this library: it uses Native Modules, which involves lots of inefficient marshalling, and also makes proper binary key/value support impossible. I'd suggest adopting react-native-leveldb instead: it's a more correct and more efficient JSI implementation. Unfortunately, its interface is not abstract-leveldown compatible. If anyone would like to take over this repo and turn it into a compatibility shim for react-native-leveldb, I'm happy to transfer ownership of this and/or the NPM module.

react-native-leveldown

This library implements an abstract-leveldown compatible interface to LevelDB for React Native. The implementation is a thin Native Module binding directly to the original C++ implementation of LevelDB.

The native bindings are implemented for iOS and Android. The iOS bindings will also run on macOS via Catalyst.

My thanks to Giacomo Randazzo (@RAN3000) for contributing the Android bindings to this package.

Usage

Install via yarn add react-native-leveldown. Make sure to cd ios; pod install to build the native module for iOS.

This module implements the interface defined in abstract-leveldown, so you can either use it directly as documented there or somewhat more conveniently using the levelup wrapper.

Typical usage:

import RNLeveldown from "react-native-leveldown";
import LevelUp from "levelup";

const db = LevelUp(new RNLeveldown("myDatabaseName"));
await db.put("hello", "world");
await db.get("hello") // # => "world"
await db.close();

Note that databases are stored in the app container's Documents directory on iOS and the app's persistent files directory on Android. In the future, the constructor API should probably be extended to add an option to store it instead in some semi-durable cache location, or an ephemeral temporary directory.

Testing

This library passes the abstract-leveldown test suite. To run the tests:

# Setup:
cd testapp
yarn install

# To run the tests on iOS:
(cd ios; pod install)
yarn ios

# To run the tests on Android:
yarn android

Alternatives

If you're looking for an implementation with no native code, you may be interested in asyncstorage-down, which implements abstract-leveldown using React Native's built-in AsyncStorage. Note that this approach will be much slower than native LevelDB bindings, particularly on iOS, where AsyncStorage is basically a serialized JSON blob.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].