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.
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);
You can run tests using :
npm run test
or specific tests for specific features like :
npm run test:queryParser
you can use the cli using
node src/cli
- 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