AsyncMysqlClient

An asynchronous MySQL client

This class allows you to asynchronously connect to a MySQL client. You can directly connect to the MySQL client with the connect() method; in addition you can use this class in conjunction with AsyncMysqlConnectionPool pools by setting the limit of connections on any given pool, and using AsyncMysqlConnectionPool::connect().

There is some duplication with this class. If possible, you should directly construct connection pools via new AsyncMysqlConnectionPool() and then call AsyncMysqlConnectionPool::connect() to connect to the MySQL client using those pools. Here we optionally set pool limits and call connect() on this class. AsyncMysqlConnectionPool provides more flexibility with other available options, etc.

In fact, there is discussion about deprecating AsyncMysqlClient all together to avoid having this choice. But, for now, you can use this class for asynchronous connection(s) to a MySQL database.

Guides

Interface Synopsis

final class AsyncMysqlClient {...}

Public Methods