RestySqlite/README.md

41 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2025-02-08 22:43:18 +03:00
# RestySqlite
2025-02-09 12:46:42 +03:00
WIP online sqlite database managment system
2025-02-09 16:38:49 +03:00
- WebAPI implemented.
2025-02-09 12:46:42 +03:00
- Database abstraction is almost done
2025-02-09 22:15:52 +03:00
## How it works
2025-02-09 12:46:42 +03:00
2025-02-09 22:15:52 +03:00
It's a RESTfull application which will allows easy database manipulation.
2025-02-09 12:46:42 +03:00
2025-02-09 22:15:52 +03:00
### Endpoints
2025-02-09 12:58:24 +03:00
2025-02-09 22:15:52 +03:00
`GET:localhost/api"` - provide json of tables inside database
2025-02-09 12:59:02 +03:00
2025-02-09 22:15:52 +03:00
`GET:localhost/table_name/` - provide json of columns and their values inside table
2025-02-09 12:58:24 +03:00
2025-02-09 22:15:52 +03:00
`GET:localhost/api/table_name/column_name/` - provide json of values inside column
2025-02-09 16:38:49 +03:00
2025-02-09 22:15:52 +03:00
`GET:localhost/api/table_name/id` - provide json-serilazed value from database
2025-02-09 16:38:49 +03:00
2025-02-09 22:15:52 +03:00
`POST:localhost/api/sqlcommand` - execute sql command to database.
2025-02-09 12:59:02 +03:00
2025-02-09 22:15:52 +03:00
### Example usage
In example scope application is connected to database which have users table.
```bash
$ curl -X POST -d "INSERT INTO users (Name) VALUES ('Max')" http://localhost:5417/api/sqlcommand -i
$ curl -X GET http://localhost:5417/api/users
```
2025-02-09 12:58:24 +03:00
### Manifest of goals
2025-02-09 12:46:42 +03:00
API **will** provide endpoint for each table and table column inside database.
2025-02-09 22:15:52 +03:00
API **will** allow execute any SQL command.
2025-02-09 12:46:42 +03:00
API **will NOT** protect from SQL injections. It's up to user manage security stuff.
API **will NOT** protect itself via password. It's up to user manage security stuff.