Updated APIv5 Query API (markdown)

Risto Lahtela 2021-01-23 11:43:10 +02:00
parent 929eb83eed
commit 375a3ddf8f

@ -8,6 +8,8 @@ This API requires `QUERY_API` capability.
See [APIv5](https://github.com/plan-player-analytics/Plan/wiki/APIv5#plan-api-version-5) for dependency information
- [Getting started with Query API](https://github.com/plan-player-analytics/Plan/wiki/Query-API-Getting-started)
### Table of contents
- Obtaining QueryService
@ -15,6 +17,7 @@ See [APIv5](https://github.com/plan-player-analytics/Plan/wiki/APIv5#plan-api-ve
- Performing Queries
- Available pre-made queries
- Executing Statements
- Recap of Thread blocking
## Obtaining QueryService
@ -128,3 +131,12 @@ If you would like to wait for the statement to execute you can call `Future#get(
```
</details>
## Recap on thread blocking
Blocking the server-thread usually leads to a crash. If something blocks a thread it is best to be executed inside an asynchronous task or on a separate thread.
- `QueryService#execute` does not block the thread.
- The `Future` returned by `QueryService#execute` can be used to block the thread until SQL executes with `Future#get`.
- `QueryService#query` blocks the thread.
- All methods in `CommonQueries` block the thread.