Skip to content

A lightweight in-memory SQL database written in Go

License

Notifications You must be signed in to change notification settings

AustinZhu/mintsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mintsql

Go Docker codecov

MintSQL is a lightweight SQL database written in Go that supports basic database CRUD operations.

Prerequisites

Make sure you have the following installed:

  • Go 1.17
  • Docker (optional)

Getting Started

Run the server (on local):

make run-server

Run the server (in docker container):

make docker-run

Run the client:

make run-client

Installation

Install the server:

make install-server

Install the client:

make install-client

Usages

The default port for MintSQL is 7384.

Server

mintsql <port>

Client

mintcli <host> <port>

Querying from the client console

The query language is a subset of SQL. For now, MintSQL only supports simple CREATE|INSERT|SELECT queries.

To quit the client console, type \quit.

Examples

  • Create a table:
> CREATE TABLE students (id INT, name TEXT);
ok
  • Insert values into a table:
> INSERT INTO students VALUES (1, 'Bob');
ok
  • Select data in a table:
> SELECT name, id FROM students;
| name | id |
==============
|  Bob |  1 | 

About

A lightweight in-memory SQL database written in Go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published