mirror of
https://gitlab.com/nullmax17/RestySqlite.git
synced 2025-03-14 16:01:13 +03:00
readme update
This commit is contained in:
parent
5d776304d7
commit
5ba5d0b644
27
README.md
27
README.md
@ -5,29 +5,36 @@ WIP online sqlite database managment system
|
||||
- WebAPI implemented.
|
||||
- Database abstraction is almost done
|
||||
|
||||
## How it will work?
|
||||
## How it works
|
||||
|
||||
In future I want to make a RESTfull application which will allow
|
||||
easy database manipulation.
|
||||
It's a RESTfull application which will allows easy database manipulation.
|
||||
|
||||
### Example endpoints
|
||||
### Endpoints
|
||||
|
||||
`GET:localhost/api"` - will provide json of tables inside database
|
||||
`GET:localhost/api"` - provide json of tables inside database
|
||||
|
||||
`GET:localhost/table_name/` - will provide json of columns inside table
|
||||
`GET:localhost/table_name/` - provide json of columns and their values inside table
|
||||
|
||||
`GET:localhost/api/table_name/column_name/` - will provide json of objects inside column
|
||||
`GET:localhost/api/table_name/column_name/` - provide json of values inside column
|
||||
|
||||
`GET:localhost/api/table_name/id` - will provide json object specific to this id
|
||||
`GET:localhost/api/table_name/id` - provide json-serilazed value from database
|
||||
|
||||
`POST:localhost/api/sqlcommand` - will allow execute global query to database. For example creating new table.
|
||||
`POST:localhost/api/sqlcommand` - execute sql command to database.
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### Manifest of goals
|
||||
|
||||
API **will** provide endpoint for each table and table column inside database.
|
||||
|
||||
API **will** allow execute any SQL query.
|
||||
API **will** allow execute any SQL command.
|
||||
|
||||
API **will NOT** protect from SQL injections. It's up to user manage security stuff.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user