11

I am learning LiteDB - NoSQL. I have go through the basic example. When I build it, it will generate Data Base File. Now, I just want to read this file to see the data I have stored. Is is possible to read it like we can see the data in MSSQL? How can I see the stored data?

Any help is appreciated. Thanks.

Community
  • 1
  • 1
Ankita
  • 1,416
  • 4
  • 17
  • 42
  • Ankita, there is an answer to your question which looks quite good. Did it solve your problem? If so, feel encouraged to accept it (tick the 'accept' checkmark to its left). – mafu Jul 27 '16 at 13:24

5 Answers5

19

LiteDB comes with a shell console program. With this tool you can insert/update/delete or query any document in your data file. To download LiteDB Shell, go to http://github.com/mbdavid/LiteDB/releases

Some common commands:

  • open yourdatafile.db - Open your datafile
  • db.your_collection_name.find - List all documents inside your collection
  • db.your_collection_name.ensureIndex name - Create an index in name document field
  • db.your_collection_name.find name = 'John' - Search for documents with name = John
  • help full - Show all commands in shell.
Doug L.
  • 2,676
  • 1
  • 19
  • 33
mbdavid
  • 1,076
  • 7
  • 8
  • 1
    Hi Mauricio, Thanks for the wonderful LiteDB! Do you have any plan to port the shell console program to another platform such as Mac, using .NET Core maybe? ... I was looking for something like this for mac. Thanks. – undefined Jun 11 '17 at 01:47
  • 1
    Hi @IKnowNothingAtAll, thanks! Current shell versions supports are build only in full .net. But try compile shell app in .net core: all source are made using net standard. – mbdavid Jun 11 '17 at 21:19
  • Does this shell program still exist in v5? The documentation is only for v4 and I don't see it in releases. – Red Riding Hood Feb 16 '21 at 15:36
8

I have written fully fledged editor, which can be downloaded here https://github.com/JosefNemec/LiteDbExplorer

Josef Nemec
  • 672
  • 1
  • 6
  • 16
  • 1
    Thanks, it looks good from the first look! (but it does not remember the list of opened databases) – Mar May 02 '17 at 10:04
5

You can find a bare bones viewer here.

Jim Hewitt
  • 1,726
  • 4
  • 24
  • 26
2

You can use LiteDB.Studio which is developed by LiteDB original author. As of today, it is in version 0.5.2 and works well for LiteDB v5.

https://github.com/mbdavid/LiteDB.Studio

Edit: it's Windows only.

0

In PowerShell, for LiteDB databases you can use the module Ldbc.

It is the complete document store solution in PowerShell, batteries included. But it may be used just for exploring data of existing databases.

Roman Kuzmin
  • 40,627
  • 11
  • 95
  • 117