Skip to content

⚪ A C++ implementation of typicode/lowdb js library

License

Notifications You must be signed in to change notification settings

henryhale/lowdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LowDB

LowDB is a lightweight C++ library for simple key-value storage with support for different storage adapters. It provides an easy-to-use interface for storing, retrieving, updating, and removing data. It is a C++ port of typicode/lowdb javascript library.

Features

  • Simple key-value storage.
  • Easy-to-use interface for interacting with the data.
  • Supports default and custom-made storage adapters (e.g. in-memory adapter).

Installation

To use LowDB in your C++ project, you can either link against the static library or include the source files directly in your project.

Static Library

  1. Clone the repository:

    git clone https://github.com/henryhale/lowdb.git
  2. Compile the library:

    cd lowdb/build
    chmod +x start.sh
    ./start.sh
  3. Include the header files located in the include/lowdb directory in your project.

  4. Link against the static library (liblowdb.a) located in the build directory.

Source Files

You can also include the source files directly in your project. Simply copy the source code files into your project directory and compile them along with your project.

Usage

A complete example illustrating how to use LowDB can be found in the example sub folder.

#include "path/to/lowdb.hpp"
#include <cstdlib>
#include <iostream>

int main(void) {
  lowdb::Store db = lowdb::createInMemoryDatabase();

  db.set("key", "value");

  std::cout << db.get("key") << std::endl;

  return EXIT_SUCCESS;
}

Contributing

Contributions to LowDB are welcome! To contribute, follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature/your-feature).
  6. Create a new pull request.

License

This project is licensed under the MIT License

Copyright © 2024-present, Henry Hale

About

⚪ A C++ implementation of typicode/lowdb js library

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published