modular_api_postgres 0.7.0
modular_api_postgres: ^0.7.0 copied to clipboard
Official MACSS Postgres integration package for Dart.
Changelog #
0.7.0 #
trace_idchanges shape when tracing is configured. Withouttracingit stays a dashed UUID v4, exactly as before; withtracingit becomes the 32-hex W3C trace id of the server span, which is what a trace backend can join on. The change is gated on adopting tracing so that consumers who do not ask for it are unaffected. Check any query, dashboard or alert that assumes the dashed form — see the observability guide. This package does not emit that field itself; the note is here because a synchronized release moves all packages together- add database spans:
traceDbClient(client)wraps aDbClientso its commands, transactions and session acquisitions produce OpenTelemetry spans - instrumentation is a decorator over the contract, not a change to
DbClient— wrapping the application-suppliedDbCommandExecutorcoversDbClient,DbRepositoryandDbTransactionContextat once, including commands issued inside a transaction body - not wrapping is how you turn tracing off, so an existing consumer is unaffected and pays nothing
- the SQL text is not recorded by default; opt in with
DbTracingOptions(includeQueryText: true). Parameter values are never recorded regardless: the text is a template, the parameters are the data - spans use the stable database conventions —
db.system.name,db.namespace,db.operation.name,db.query.text. The deprecateddb.system,db.name,db.operationanddb.statementare not emitted db.system.nameispostgresql, the value the conventions register — not ourengineId, which ispostgres- session acquisition gets its own
CONNECTspan, so time spent waiting for a connection is attributed rather than falling into an unexplained gap - this package is no longer dependency-free: it declares
dartastic_opentelemetry_apidirectly, because it does not depend onmodular_apiand so cannot inherit it (runbook D21). It still declares no OTel SDK, exporter, gRPC or protobuf — those belong to the application (ADR-0005 A2) — and no database driver, which ADR-0004 requires and a new test now asserts
0.6.0 #
- add typed command parameters via
DbParameter(name, value, direction input/output/inputOutput, free-formtypeHint) withinput/output/inputOutputhelpers - add
DbCommandKind.procedurefor stored-procedure execution (the adapter maps it to EXEC/CALL; rows viaquery, no-rows viaexecute) - add optional
DbProcedureOutcome(returnValue, outputParameters) onDbRowSetandDbExecutionSummary - extend shared-fixture conformance coverage for the new contracts across the three SDKs
- additive and non-breaking:
DbCommandkeeps its signature (parameters already accept any value)
0.5.0 #
- version bump for cross-SDK parity (ADR-0002); no functional changes
0.4.7 #
- bootstrap
modular_api_postgresfor Dart - add the first Postgres database client slice with shared contracts, repository helpers, and health support
- add tests for defaults, result helpers, lease ownership, transactions, close flows, and GraphQL support bundling