ic-dbms-canister 0.0.0

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: Integer,
    name: Text,
    email: Text,
    age: Integer,
}

This will provide for the user the following API:

todo...

You can also define relationships between tables:

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

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

ic_odbc_canister!(User, Post, Comment);

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

License

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