JSPM

pfraze-lev

3.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q11658F
  • License MIT

CLI & REPL for LevelDB

Package Exports

  • pfraze-lev

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pfraze-lev) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

STATUS

Join the chat at https://gitter.im/hij1nx/lev BETA

SYNOPSIS

A simple and convenient commandline tool and REPL for leveldb.

FEATURES

  • REPL with colorized tab-completion and zsh/fish style key suggestions
  • REPL automatically saves and reloads REPL history

SCREENSHOT

screenshot

REPL COMMANDS

Use upper or lower case for the following commands.

GET <key>

Get a key from the database.

PUT <key> <value>

Put a value into the database. If you have keyEncoding or valueEncoding set to json, these values will be parsed from strings into json.

DEL <key>

Delete a key from the database.

LS [sublevel]

Get all the keys or values in the current range.

Opts:

  • [sublevel] A sublevel filter, eg ls users
  • -v/--values Include values
  • -s/--select <attr> Filter attributes down to given attribute(s). Can be used more than once. Eg: ls -s username -s email
  • -f/--filter <attr>=<value> Filter entries down to given attribute=value match(es). Can be used more than once. Eg ls -f username=bob -f email=bob@gmail.com

START <key-pattern>

Defines the start of the current range. You can also use GT or GTE.

END <key-pattern>

Defines the end of the current range. You can also use LT or LTE.

SUB <name>

Sugar to set START and END to the pattern for the given sub-level.

SUBS

Tries to guess the full listing of sub-levels in the DB.

LIMIT <number>

Limit the number of records in the current range (defaults to 5000).

REVERSE

Reverse the records in the current range.

CLI COMMANDS

These all match the parameters used with levelup. The default encoding for the database is set to json.

--start <key-pattern>

Specify the start of the current range. You can also use gt or gte.

--end <key-pattern>

Specify the end of the current range. You can also use lt and lte.

--values

Only list the all of the values in the current range. Emit as a new-line delimited stream of json.

--keys

Only list all of the keys in the current range. Will tabularize the output.

--keyEncoding <string>

Specify the encoding for the keys.

--valueEncoding <string>

Specify the encoding for the values.

--limit <number>

Limit the number of records emitted in the current range.

--reverse

Reverse the stream.