flush
[mdref/mdref-pq-gateway] / pq-gateway / pq / Gateway / Table / execute.md
1 # protected mixed pq\Gateway\Table::execute(pq\Query\Writer $query)
2
3 Execute the query on behalf of this table.
4 The executed query's result will be forwarded to pq\Gateway\Table::onResult().
5
6 ## Params:
7
8 * pq\Query\Writer $query
9 The query to execute.
10
11 ## Returns:
12
13 * pq\Result, when using pq\Query\Executor, the synchronous executor.
14 * a [deferred promise of React/Promise](https://github.com/reactphp/promise#deferred-1), when using pq\Query\AsyncExecutor, the asynchronous executor.