Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 1.2 KB

README.md

File metadata and controls

59 lines (36 loc) · 1.2 KB

customDBJS

A simple database project written in JavaScript to parse and execute queries

Project Status

This project is currently in development. It is not yet ready for use. Feel free to explore the code and contribute if you're interested.

Scripts

npm start

Runs the application in the terminal.

npm test

Launches the Jest test runner for running automated tests. For more information about Jest, please refer to the official documentation

prettier . --write

Formats the code using Prettier to ensure consistent code style and formatting.

SELECT statement on table

SELECT columnOne, columnTwo FROM tableName
SELECT * FROM tableName
SELECT * FROM tableName where {"columnOne": value}

throw error if no table exists

INSERT a record in table

INSERT {"a" : 10, "B" : 20} INTO table

Creates table if it does not exists

WHERE clause

SELECT * FROM tableName WHERE {"columnOne": value}

DELETE a record in table

DELETE FROM tableName WHERE {"columnOne": value}

Add Comments

-- Some comment here

You can add comments using the "--" syntax. Comments are ignored by the parser.