Search code examples
.netlitedbnosql

How to see stored data in LiteDB-NoSQL


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.


Solution

  • 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.