ic-dbms-canister 0.0.1

A framework to build Database canisters on the Internet Computer using DBMS, by just providing the schema.
Documentation

IC DBMS Canister

logo

license-mit repo-stars downloads latest-version ko-fi conventional-commits

ci coveralls docs

This project is in a very early stage of development. The goal is to provide a framework for building database canisters on the Internet Computer.

Overview

IC DBMS Canister is an Internet Computer framework which provides an easy way to implement a database canister by just providing the database schema.

The user can just define the data entity by defining the tables

#[derive(Table)]
struct User {
    #[primary_key]
    id: Uint64,
    name: Text,
    email: Text,
    age: Nullable<Uint32>,
}

This will provide for the user the following API:

todo...

You can also define relationships between tables:

#[derive(Table)]
struct Post {
    #[primary_key]
    id: Uint64,
    title: Text,
    content: Text,
    #[foreign_key(table = "User", column = "id")]
    author_id: Uint64,
}

And once you have defined all your tables, you can instantiate the database canister:

ic_dbms_canister!(User, Post);

And you will have a fully functional database canister with all the CRUD operations implemented for you.

The canister API will be automatically generated based on the defined tables, with the following methods:

todo...

Features

  • Define tables with common attributes
  • CRUD operations
  • Complex queries with filtering and pagination
  • Relationships between tables with foreign keys
  • Transactions with commit and rollback
  • Access Control Lists (ACL) to restrict access to the database
  • JOIN operations between tables (coming soon)
  • Migrations to update the database schema without losing data (coming soon)
  • Indexes on columns to optimize queries (coming soon)

Documentation

License

This project is licensed under the MIT License. See the LICENSE file for details.