dpgsql 1.0.0
dpgsql: ^1.0.0 copied to clipboard
High Performance PostgreSQL Driver for Dart
Changelog #
1.0.0 #
- Added PostgreSQL real integration coverage for pipeline, COPY, pooling, encodings, notifications, error recovery, and common type decoding.
- Added GitHub Actions workflow with PostgreSQL 14, 15, 16, and 17.
- Added README documentation with installation, pooling, prepared statements, batch/pipeline, COPY, notifications, encodings, tests, and benchmarks.
- Added benchmark comparison against
postgres_fork,postgres, PHPext-pgsql, PHPPDO_PGSQL,voryx/PgAsync, andamphp/postgres. - Added application-level typed class + JSON benchmark to force PHP and Dart type conversion, object hydration, and serialization work.
- Added bundled codecs for PostgreSQL client encoding support.
- Implemented robust connection pooling with checkout wait queue, warmup, idle lifetime, connection lifetime, and pool metrics.
- Implemented lazy row decoding and fast paths for common scalar result types.
- Added typed data reader getters and optimized DataRow parsing/message reads for result-set hot paths.
- Added materialized
executeRows()and lazyexecutePgRows()result-set APIs. - Added
executeMaps(),DpgsqlDataReader.toMap(), andDpgsqlDataReader.readAllMaps()for ORM-style map rows. - Added
PgResultMode.rawTextfor PHP-styleString/nullresult access and raw text map benchmarks. - Added
DpgsqlCommand.forEachPgRow()for streaming transient lazy row views without result-list materialization. - Added configurable
TimeZoneSettingsfor UTC/default and local timestamp/date decoding, including pooled session restore forTimeZoneandclient_encoding. - Added opt-in vendored PostgreSQL/IANA timezone support for named
timestamptzdecoding without adding external runtime dependencies, withlatest_allas the robust default andIANA Time Zone Database Scope=latest_10yas the compact runtime option. - Added nullable PostgreSQL date/time infinity handling by default, with
Throw On DateTime Infinity=truefor strict behavior. - Added a pure Dart IANA timezone generator that parses
Rule,Zone, andLinkrecords withoutzic.c,package:timezone, or external reference directories; bothlatest_alland compactlatest_10ygenerated databases are supported, and the runtime-facinglatest.tzfdefault filename was removed. - Moved Dart package-driver benchmark dependencies to
benchmarks/pubspec.yamlso the main package stays free of benchmark transitive dependencies. - Added
result_sets_mapsbenchmark coverage forMap<String, dynamic>row materialization. - Added PHP associative-map benchmark coverage and 3000-row result-set scenarios.
- Added
DpgsqlCommand.forEachPgRowSync()and cached command execution plans to reduce per-row and per-execution overhead in hot paths. - Optimized repeated unprepared command planning by replacing per-execution string signatures with structural cache checks.
- Added default PostgreSQL type inference for untyped string parameters (
Infer String Parameters As Unknown=true), improving ORM compatibility for ISO timestamp strings and other context-typed columns while preserving explicitDpgsqlDbType.text/varcharbehavior. - Documented and validated Laravel/Eloquent-style
DateTimebindings: ORMs may formatDateTimeasyyyy-MM-dd HH:mm:ss, anddpgsqlkeeps those untyped strings as PostgreSQL-inferred parameters by default sotimestamp without time zonecolumns preserve wall-clock time. - Added
Decode Uuid As String=truedefault for ORM/PDO compatibility, withDecode Uuid As String=falsepreserving Npgsql-likeDpgsqlUuiddecoding. - Added parsed
json/jsonbdecoding by default for ORM/PDO compatibility with nested model maps/lists, withDecode Json As String=truepreserving raw JSON string decoding. - Added non-string configuration entry points via
DpgsqlConnection.fromConnectionStringBuilder()andDpgsqlDataSource.fromConnectionStringBuilder(), allowing integrations to pass configured settings directly instead of serializing a connection string. - Applied configured session settings (
Search Path,Application Name,Statement Timeout,Lock Timeout, andIdle In Transaction Session Timeout) directly fromDpgsqlConnectionStringBuilderfor both standalone connections and pooled data sources. - Optimized binary date/timestamp/timestamptz conversion by avoiding
Durationallocation in hot paths. - Implemented text parsing for PostgreSQL
byteaandnumeric. - Implemented text parsing for PostgreSQL range types.
- Fixed protocol recovery after
ErrorResponseduring reader initialization. - Hardened auto-prepare fallback when no safe prepared statement slot is available.
- Implemented simple and extended PostgreSQL query protocol support.
- Added parameters, prepared statements, auto-prepare cache, batch execution, and pipeline mode.
- Added binary COPY import/export support.
- Added SSL modes, SCRAM-SHA-256 authentication, cancellation, and notifications.
- Added handlers for scalar types, arrays, JSON/JSONB, geometric types, ranges, timestamps, intervals, numeric, money, and bytea.
- Added large object and logical replication scaffolding.