Skip to content

Commit

Permalink
added const for settings classes (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrel authored Dec 4, 2023
1 parent 313a20d commit 7c94186
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 3.0.3

- Using const for ConnectionSettings, SessionSettings and PoolSettings classes. ([#267](https://github.com/isoos/postgresql-dart/pull/267) by [Gerrel](https://github.com/Gerrel))

## 3.0.2

- Fix: Dispose disconnected pool `Connection`s. ([#260](https://github.com/isoos/postgresql-dart/pull/260) by [nehzata](https://github.com/nehzata)).
Expand Down
4 changes: 2 additions & 2 deletions lib/postgres.dart
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class ConnectionSettings extends SessionSettings {
/// built-in ones provided by the package.
final TypeRegistry? typeRegistry;

ConnectionSettings({
const ConnectionSettings({
this.applicationName,
this.timeZone,
this.encoding,
Expand Down Expand Up @@ -484,7 +484,7 @@ class SessionSettings {
/// parameters are found.
final bool? ignoreSuperfluousParameters;

SessionSettings({
const SessionSettings({
this.connectTimeout,
this.queryTimeout,
this.queryMode,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/pool/pool_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PoolSettings extends ConnectionSettings {
/// NOTE: not yet implemented
final int? maxQueryCount;

PoolSettings({
const PoolSettings({
this.maxConnectionCount,
this.maxConnectionAge,
this.maxSessionUse,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: postgres
description: PostgreSQL database driver. Supports statement reuse and binary protocol and connection pooling.
version: 3.0.2
version: 3.0.3
homepage: https://github.com/isoos/postgresql-dart
topics:
- sql
Expand Down

0 comments on commit 7c94186

Please sign in to comment.