Skip to content

rayaanoidPrime/csvDB-SQL

Repository files navigation

StylusDB SQL

A SQL database engine written in JavaScript.

This is my implementation of the C4GT classroom program project StylusDB-SQL. This is developed from the base repository for cohort members to follow the tutorial and send in their own StylusDB SQL implementations. Inspired by : https://github.com/ChakshuGautam/stylusdb-sql

Disclaimer: This database is for educational purposes only. It is not intended for production use. It is written ground up in JavaScript and is a great way to learn how databases work. You can find the tutorial in the docs directory.

Usage

SELECT queries

const { executeSELECTQuery } = require('csvdb-sql');
const query = 'SELECT id, name FROM student WHERE age < 25';
const result = await executeSELECTQuery(query);

INSERT queries

const { executeINSERTquery } = require('csvdb-sql');
const insertQuery = "INSERT INTO grades (student_id, course, grade) VALUES ('4', 'Physics', 'A')";
await executeINSERTQuery(insertQuery);

DELETE queries

const {executeDELETEquery} = require('csvdb-sql');
const deleteQuery = "DELETE FROM courses WHERE course_id = '2'";
await executeDELETEQuery(deleteQuery);

Development

Running Tests

You can run tests using :

npm run test

or specific tests for specific features like :

npm run test:queryParser

CLI

you can use the cli using

node src/cli

Feature Roadmap

  • Support for Prisma
  • INSERT, DELETE, SELECT
  • CLI
  • Server/Client Basic Protocol
  • NPM Package for StylusDB-SQL
  • UPDATE, CREATE TABLE, DROP TABLE
  • SQL Spec Tracker
  • Minimal PostgreSQL Protocol for Server/Client Communication

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages