Skip to content

jrdevore/ldb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img

SYNOPSIS

A c++ repl for leveldb

INSTALL

$ clib install hij1nx/ldb

BUILD

Mac OS X

$ brew install snappy
$ git clone https://github.com/hij1nx/ldb.git
$ make install -C ldb

Linux (Debian / others?)

$ apt-get install libsnappy-dev
$ git clone https://github.com/hij1nx/ldb.git
$ sudo make install

USAGE

Open an existing database with interactive mode (REPL) and create the database if it does not exist with optional flag -c.

ldb -i ./testdb -c

Use as a commandline interface

ldb -h

KEY AUTO-COMPLETE

ldb will get the first n (as defined in LIMIT) records and make them available for autocomplete. If the limit is redefined, the cache will be refreshed to reflect the new range.

When possible, hitting tab will allow you to cycle though keys that match your partial input. Also, if there is a partial match it will be highlighted in the results.

img

COMMANDS

You can get, put or del a single key at any time. Many of the following commands help you to create ranges so that you can casually explore smaller sets of data.

Get a key's value

>get <keyname>

Put a value to a key

>put <keyname>;<value>

List the keys in the curent range

>ls

Find string in keys or values using a regex

>in keys <regex>
>in values <regex>

Set the start of the current range

>start <string>

Set the end of the current range

>end <string>

Set the limit for the current range

>limit <number>

Get the size of the the current range (in bytes)

>size

About

A C++ REPL / CLI for LevelDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 90.0%
  • Makefile 10.0%