https://github.com/somnath-chattaraj/database
Simple Database build using Javascript
https://github.com/somnath-chattaraj/database
database javascript nodejs repl
Last synced: about 1 month ago
JSON representation
Simple Database build using Javascript
- Host: GitHub
- URL: https://github.com/somnath-chattaraj/database
- Owner: Somnath-Chattaraj
- Created: 2024-12-17T16:37:48.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-12-17T16:38:29.000Z (5 months ago)
- Last Synced: 2025-04-12T21:57:37.975Z (about 1 month ago)
- Topics: database, javascript, nodejs, repl
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## To start the project locally
```sh
npm install
node index.js repl
```## Database Commands
#### using [database name]
Either loads a database from the directory you are currently in or creates a database with the specified name if none exists
Example: using test
#### create [table name] [columns names]
creates a new table in the database with the specified columns
Example:
```sh
create users username password
```#### insert [table name] [columns values]
inserts a new document in the specified table with the values passed
Example:
```sh
insert users JohnDoe helloWorld
```#### select [columns name or *] From [table name] [where?]
returns an array with the specified columsn from the database
Example:
```sh
select username from users
```#### where [key] [operator] [value]
optional parameter for the select command, compares the values from the table with the ones informed using the informed operator
Example:
```sh
select username from users where name = JohnDoe
```