postgresql2 1.7.0 postgresql2: ^1.7.0 copied to clipboard
A fork of Greg's PostgreSQL driver (xxgreg/postgresql) using conserved substitution respecting strings and @@ operators. Also optimizing the pool implementation aggressivly.
Version 1.7.0 #
- BREAK CHANGE The
values
paramter ofConnection.query
andexecute
must beMap
. ForList
values (by-index), please usequeryByList
andexecuteByList
instead.
Version 1.6.2 #
- The
stats
parameter added toonQuery
andonExecute
to pass application-specific data for monitoring the connections, such as detecting abnormal access, such as a dead loop. - The
onOpen
callback added toPoolSettings
to prepare thestats
paremeter mentioned above.
Version 1.0.4 #
Pool.typeConverter
added.
Version 1.0.3 #
runInTransaction
supports nested transactions.
Version 1.0.2 #
- The
onExecute
andonQuery
callback are added toPoolSettings
to detect unexpected patterns, such as a missing@
or low-performance statements.
Version 1.0.1 #
- Fix #20: remove connections from the pool when detecting server restarted/crashed
- Fix #21: retry if failed to establish a connection
Version 1.0.0 #
- Migrate to null safety
- Numeric and Decimal types are consider as
double
, instead ofBigInt
.- It means the precision is bounded by
double
.
- It means the precision is bounded by
- The
getConnectionName()
andgetDebugName()
arguments are simplifed asString? connectionName
andString? debugName
. Settings.fromMap
andSettings.toMap
are removed.- The
mockSocketConnect
argument is removed.
Version 0.7.7 #
- Rename
freeConnections
tolimitConnections
- Add
limitTimeout
to control how long to wait when exceedinglimitConnections
Version 0.7.6 #
- If
freeConnections
is set, we'll wait up to 700ms, if number of connections exceeds [freeConnections]. It helps to reduce number of connections if there are a lot of short-lived connections.
Version 0.7.4 #
Settings.onMaxConnection
introduced to monitor the usage of DB connections.
Version 0.7.3 #
freeConnections
introduced to control maximal number of connections kept in a pool.
Version 0.7.0 #
- Breaking: the substition with a Map instance won't treat number identifiers specially. For example, if
@0
is specified, it will consider the identifier as'0'
and retrievevalues['0']
.
Version 0.6.0 #
- Array type with single dimension supported.
isUtcTimeZone
removed fromDefaultTypeConverter.decodeDateTime()
and related functions.DefaultTypeConverter.decodeDateTime()
converts the DateTime instance to local time by callingDateTime.toLocal()
.
Version 0.5.8 #
encodeString()
ignores thetrimNull
argument. Now it always removes the null characters.
Version 0.5.7 #
Pool.busyConnectionCount
counts onlyinUse
.
Version 0.5.6 #
Connect.runInTransaction
returns the result of the transaction operation.
Version 0.5.5 #
Pool.debugName
removed.- Make the pool more likely to shrink.
Version 0.5.4 #
PoolImpl
with two new methods:pooledConnectionCount
andbusyConnectionCount
Version 0.5.3 #
- Support BigInt.
- Note:
_PG_NUMERIC
will be converted toBigInt
, if possible (instead ofString
). Otherwise, it is converted to aString
instance.
- Note:
Version 0.5.2 #
- Upgrade to Dart 2.5
Version 0.3.4 #
- Update broken crypto dependency.
Version 0.3.3
- Fix #73 Properly encode/decode connection uris. Thanks to Martin Manev.
- Permit connection without a password. Thanks to Jirka Daněk.
Version 0.3.2
- Improve handing of datetimes. Thanks to Joe Conway.
- Remove manually cps transformed async code.
- Fix #58: Establish connections concurrently. Thanks to Tom Yeh.
- Fix #67: URI encode db name so spaces can be used in db name. Thanks to Chad Schwendiman.
- Fix #69: Empty connection pool not establishing connections.
Version 0.3.1+1
- Expose column information via row.getColumns(). Credit to Jesper Håkansson for this change.
Version 0.3.0
-
A new connection pool with more configuration options.
-
Support for json and timestamptz types.
-
Utc time zone support.
-
User customisable type conversions.
-
Improved error handling.
-
Connection.onClosed has been removed.
-
Some api has been renamed, the original names are still functional but marked as deprecated.
- import 'package:postgresql/postgresql_pool.dart' => import 'package:postgresql/pool.dart'
- Pool.destroy() => Pool.stop()
- The constants were upper case and int type. Now typed and lower camel case to match the style guide.
- Connection.unhandled => Connection.messages
- Connection.transactionStatus => Connection.transactionState
Thanks to Tom Yeh and Petar Sabev for their helpful feedback.