https://github.com/pavi2410/sequel
Simple ever SQL DB (under 200 lines)
https://github.com/pavi2410/sequel
crud database db ddl dml python sql
Last synced: 7 months ago
JSON representation
Simple ever SQL DB (under 200 lines)
- Host: GitHub
- URL: https://github.com/pavi2410/sequel
- Owner: pavi2410
- License: mit
- Created: 2021-04-22T08:12:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T07:16:33.000Z (over 3 years ago)
- Last Synced: 2025-01-28T00:30:58.772Z (8 months ago)
- Topics: crud, database, db, ddl, dml, python, sql
- Language: Python
- Homepage: https://microsql.pavi2410.repl.co/
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# microSQL - Simple ever SQL DB
## Supported SQL Syntax:
- DDL
```sql
create table table_name (cols, ...)
drop table table_name
```
- DML
```sql
select cols, ... from table_name [where ...]
insert into table_name (cols, ...) values (v, ...)
delete from table_name [where ...]
```
## Demo
```sql
>select name, age from demo
┏━━━┳━━━━━━┳━━━━━┓
┃ ┃ name ┃ age ┃
┡━━━╇━━━━━━╇━━━━━┩
│ 1 │ foo │ 12 │
│ 2 │ bar │ 16 │
│ 3 │ baz │ 6 │
└───┴──────┴─────┘
```## Available commands:
| Command | Description |
| --- | --- |
| .showdb | Prints the DB |
| .help | Prints this help menu and exits |
| .exit | Exits the REPL |
| .debug [on\|off] | Turns debug mode on or off |
| .db [filename] | Changes db file location |