mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-25 03:55:37 +01:00
Updated APIv5 Query API (markdown)
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
|
||||
|
||||
@ -127,4 +130,13 @@ If you would like to wait for the statement to execute you can call `Future#get(
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
</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.
|
Loading…
Reference in New Issue
Block a user