hphp/hack/manual/apis/Classes/AsyncMysqlConnection/index.md
:::info[Note] This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information. :::
An active connection to a MySQL instance
When you call connect() with a connection provided by the pool established
with AsyncMysqlConnectionPool, you are returned this connection object to
actual do real work with the MySQL database, with the primary work being
querying the database itself.
final class AsyncMysqlConnection {...}
->close(): void->connectResult(): ?AsyncMysqlConnectResultAsyncMysqlConnectResult for the current connection->escapeString(string $data): string->getSslCertCn(): string->getSslCertExtensions(): Vector<string>->getSslCertSan(): Vector<string>->host(): string->isReusable(): bool->isSSL(): bool->isSslCertValidationEnforced(): bool->isValid(): boolAsyncMysqlConnection object is valid->lastActivityTime(): float->multiQuery(Traversable<string, arraykey, mixed> $queries, int $timeout_micros = -1, dict<string> $query_attributes = dict [ ]): Awaitable<Vector<AsyncMysqlQueryResult>>->port(): int->query(string $query, int $timeout_micros = -1, dict<string> $query_attributes = dict [ ]): Awaitable<AsyncMysqlQueryResult>->queryAsync(HH\Lib\SQL\Query $query): Awaitable<AsyncMysqlQueryResult>->queryf(HH\FormatString<HH\SQLFormatter> $pattern, ...$args): Awaitable<AsyncMysqlQueryResult>->releaseConnection(): mixed->serverInfo(): string->setReusable(bool $reusable): void->sslSessionReused(): bool->warningCount(): int