One entry is wrong

LevelDataStudio » Use cases » Fix one key by hand

Download LevelDataStudio Free Trial »     Buy LevelDataStudio Now »

The situation

A setting in the store holds an old value, a key was written with the wrong payload, a corrupt entry makes the application fail on start-up, or a test store needs an entry that the application would never create itself. The application has no screen for any of this, and the alternative - writing a small program that opens the store just to change one value - is more work than the correction.

What you do

  1. Close the application that owns the store (LevelDB allows one process at a time) and open the database folder.
  2. Find the key - filtering and search, and the value shown as text, JSON, HEX or image so you can confirm it is the right one before touching it.
  3. Change the value, add a new key with a key you type, or delete the entry that is causing trouble.
  4. Close the tool and start the application again. The operations are the same ones the application would have performed.

Editing the value of a LevelDB key in Level Data Studio

This is also the pragmatic way to plant test data: a developer points the tool at a copy of a store and adds the entries the test needs, rather than writing code to seed them. Working on a copy is worth the habit - there is no undo here.

What it will not do

Related

Finding the key: look inside the database. The editor itself: edit a LevelDB key. Many keys at once: load keys from files. Keeping a copy first: export the keys. Starting a store for tests: create a LevelDB database.