Skip to content

mattheusv/tinydb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinydb

A database implementation from scratch in Rust for study purpose.


The most implementations is based on Postgresql implementation itself. Some design choices are:

Building

Tinydb is develop in Rust, so it's necessary to have the Rust build toolchain installed.

Once you have installed the Rust toolchanin, just clone the repository, build the binary and run.

  • git clone https://github.com/msAlcantara/tinydb
  • cargo install --path .

Usage

Tinydb is a server database that implements the PostgreSQL Wire Protocol so any PostgreSQL client can be used with tinydb.

The database directory should be initialized when running tinydb for the first time: tinydb --init

For second run, you can just type tinydb to start the server with default configurations.

And them you can connect using psql or any other Postgres client:

psql -h localhost -p 6379 -d tinydb

Data types

The supported data types are

  • INT
  • VARCHAR
  • BOOL

Example

CREATE TABLE t(a int, b varchar, c boolean);

INSERT INTO t(a, b, c) VALUES(42, 'tinydb', true);

SELECT * FROM t;

About

A database implementation from scratch in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages