29cbde9f327b5c71c5309be0094e70292864118f
[mdref/mdref-pq-gateway] / pq-gateway / pq / Query / AsyncExecutor / execute.md
1 # Promise pq\Query\AsyncExecutor::execute(pq\Query\WriterInterface $query, callable $callback)
2
3 Execute the query asynchronously and let the callback process the result on resolve.
4
5 > ***NOTE:***
6 This asynchronous executor implementation depends on [React/Promise](https://github.com/reactphp/promise).
7
8 ## Params:
9
10 * pq\Query\Writer $query
11 The query to execute.
12 * callable $callback
13 The result processing callback as function(pq\Result $result)
14
15 ## Returns:
16
17 * mixed, the return value of the callback.
18