Introduce QueryFuture
Summary:
This supports four ways for executing queries against MySQL:
- Async queries
- Parallel queries
- Multi queries: PHP, HPHP
- Plain old single queries
This is just a rough concept, I'll improve it later.
Test Plan:
$result = id(new QueryFuture($conn, 'SELECT 1'))->resolve(); print_r($result); $futures = array( new QueryFuture($conn, 'SELECT 1'), new QueryFuture($conn, 'SELECT 2'), ); foreach (Futures($futures) as $future) { print_r($future->resolve()); }
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5025