Skip to content

Commit 5990b2e

Browse files
committed
Add some documentation to ConnectionPool to warn users that the connection isn't made immediately.
1 parent 2c8ffa9 commit 5990b2e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/src/connection_pool.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ class ConnectionPool extends Object with _ConnectionHelpers implements Queriable
2727
final List<_Connection> _pool;
2828

2929
/**
30-
* Creates a [ConnectionPool]. When connections are required they will connect to the
31-
* [db] on the given [host] and [port], using the [user] and [password]. The [max] number
32-
* of simultaneous connections can also be specified, as well as the [maxPacketSize].
33-
*/
30+
* Creates a [ConnectionPool]. When connections are required they will connect to the
31+
* [db] on the given [host] and [port], using the [user] and [password]. The [max] number
32+
* of simultaneous connections can also be specified, as well as the [maxPacketSize].
33+
*
34+
* Note that no connections are created at this point, so any connection errors
35+
* will happen when the pool is used. If you need to find out if the connection
36+
* details are correct you might want to run a dummy query such as 'SELECT 1'.
37+
*/
3438
ConnectionPool({String host: 'localhost', int port: 3306, String user,
3539
String password, String db, int max: 5, int maxPacketSize: 16 * 1024 * 1024,
3640
// bool useCompression: false,

0 commit comments

Comments
 (0)