File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,6 @@ class PoolImplementation<L> implements Pool<L> {
198
198
// flag is set, otherwise race conditions may create conflicts or
199
199
// pool close may miss the connection.
200
200
_connections.add (newc);
201
- print (_connections.length);
202
201
return newc;
203
202
}
204
203
}
@@ -230,13 +229,13 @@ class _PoolConnection implements Connection {
230
229
231
230
bool _isExpired () {
232
231
final age = DateTime .now ().difference (_opened);
233
- if (age > _pool._settings.maxConnectionAge) {
232
+ if (age >= _pool._settings.maxConnectionAge) {
234
233
return true ;
235
234
}
236
- if (_elapsedInUse > _pool._settings.maxSessionUse) {
235
+ if (_elapsedInUse >= _pool._settings.maxSessionUse) {
237
236
return true ;
238
237
}
239
- if (_queryCount > _pool._settings.maxQueryCount) {
238
+ if (_queryCount >= _pool._settings.maxQueryCount) {
240
239
return true ;
241
240
}
242
241
return false ;
Original file line number Diff line number Diff line change @@ -290,12 +290,12 @@ class PgConnectionImplementation extends _PgSessionBase implements Connection {
290
290
// transaction and should be reporte to the user.
291
291
_TransactionSession ? _activeTransaction;
292
292
293
- final Map <String , String > _parameters = {};
293
+ final _parameters = < String , String > {};
294
294
295
295
var _statementCounter = 0 ;
296
296
var _portalCounter = 0 ;
297
297
298
- late final _Channels _channels = _Channels (this );
298
+ late final _channels = _Channels (this );
299
299
300
300
@override
301
301
Channels get channels => _channels;
@@ -364,7 +364,7 @@ class PgConnectionImplementation extends _PgSessionBase implements Connection {
364
364
// Unlike runTx, this doesn't need any locks. An active transaction changes
365
365
// the state of the connection, this method does not. If methods requiring
366
366
// locks are called by [fn], these methods will aquire locks as needed.
367
- return Future . sync (() => fn (session));
367
+ return Future < R > (() => fn (session));
368
368
}
369
369
370
370
@override
Original file line number Diff line number Diff line change 1
1
name : postgres
2
2
description : PostgreSQL database driver. Supports statement reuse and binary protocol and connection pooling.
3
- version : 3.0.0-beta .1
3
+ version : 3.0.0-rc .1
4
4
homepage : https://github.com/isoos/postgresql-dart
5
5
topics :
6
6
- sql
You can’t perform that action at this time.
0 commit comments