Skip to content

fossillogic/fossil-crabdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blue Crab Database by Fossil Logic

CrabDB is a lightweight, portable key-value database designed to offer fast and efficient data storage in a user-friendly format. Available in two distinct interfaces—MyShell and NoShell—CrabDB tailors its experience to fit various use cases, from those who prefer a SQL-like syntax to those who prefer raw, key-based access. Its book-inspired structure, where each entry is akin to a page in a book, makes managing key-value pairs intuitive and easy to understand, while ensuring high performance across both small and large datasets.

Key Features

Feature MyShell NoShell
Portability & Cross-Platform Works across different operating systems, offering seamless performance with minimal dependencies. Works across various platforms without external dependencies, ensuring smooth performance.
Interface SQL-like command interface, ideal for users familiar with relational databases. Direct key-value CRUD operations with a minimalistic approach, no query language required.
CRUD Operations Insert, find, update, and delete key-value pairs with SQL-like commands. Perform CRUD operations using direct key-value access.
Backup and Restore Supports backup and restore features using MyShell's command-line interface. Allows for easy backup and restore of database files with no query overhead.
API Intuitive API designed for SQL-like interaction. Simple API for minimalistic key-value operations.
Memory Management Optimized for low memory usage and fast access, even with large datasets. Ensures efficient memory usage and performance, even with direct key-value access.
Database Management Full support for creating, opening, closing, and deleting databases, as well as managing backups. Supports similar database management operations with a direct approach, including backups and restores.

Prerequisites

To get started with Fossil CrabDB, ensure you have the following installed:

  • Meson Build System: If you don’t have Meson installed, follow the installation instructions on the official Meson website.
  • CMake Build System: If you don’t have CMake installed, follow the installation instructions on the official CMake website.

Adding Fossil CrabDB Dependency

Adding Fossil CrabDB Dependency With Meson

  1. Install Meson Build System: Install Meson version 1.3 or newer:

    python -m pip install meson           # To install Meson
    python -m pip install --upgrade meson # To upgrade Meson
  2. Create a .wrap File: Add the fossil-crabdb.wrap file in your subprojects directory and include the following content:

    # ======================
    # Git Wrap package definition
    # ======================
    [wrap-git]
    url = https://github.com/fossillogic/fossil-crabdb.git
    revision = v0.2.2
    
    [provide]
    fossil-crabdb = fossil_crabdb_dep
  3. Integrate the Dependency: In your meson.build file, integrate Fossil CrabDB by adding the following line:

    dep = dependency('fossil-crabdb')

Adding Fossil CrabDB Dependency With CMake

To use Fossil CrabDB with CMake, follow these steps:

  1. Install CMake: Install CMake version 3.13.4 or newer:

    python -m pip install cmake           # To install CMake
    python -m pip install --upgrade cmake # To upgrade CMake
  2. Find and Integrate Fossil CrabDB: After installing CMake, you can integrate Fossil CrabDB as a dependency. Add the following lines to your CMakeLists.txt file:

    # Find Fossil CrabDB package
    find_package(FossilCrabDB REQUIRED)
    
    # Link the Fossil CrabDB to your project
    target_link_libraries(your_target FossilCrabDB)
  3. Configure Your CMake Project: Make sure to configure your CMake project to include the necessary paths and dependencies for Fossil CrabDB. Typically, you’ll want to make sure the FossilCrabDB library is correctly linked in your build configuration.

    This will ensure that Fossil CrabDB is included and properly built with your project.


Configure Options

You have options when configuring the build, each serving a different purpose:

  • Running Tests: To enable running tests, use -Dwith_test=enabled when configuring the build.

Example:

meson setup builddir -Dwith_test=enabled

Contributing and Support

If you're interested in contributing to this project, encounter any issues, have questions, or would like to provide feedback, don't hesitate to open an issue or visit the Fossil Logic Docs for more information.