DBIO-DB2

 view release on metacpan or  search on metacpan

docs/adr/0002-identity-retrieval-via-identity-val-local-on-sysdummy1.md  view on Meta::CPAN

  Callers must not treat a non-identity insert's `last_insert_id` as meaningful.
- The `sysibm<name_sep>sysdummy1` reference depends on `sql_name_sep` being
  resolved (it lazy-queries the server on first access, `Storage.pm:30-40`); the
  hard-coded `.` fallback covers the common case if the server returns no value.
- Do not "modernise" this to `VALUES(IDENTITY_VAL_LOCAL())` for tidiness — the
  current spelling is a deliberate ancient-DB2 compatibility choice, not an
  accident.

## Related

- sybase ADR 0004 (identity via `SELECT MAX(col)` in a locked txn — the
  no-scope-safe-primitive sibling)
- mssql ADR 0001 (`SCOPE_IDENTITY()` + GUID identity suppression)
- mysql-async ADR 0004 (session-scoped `LAST_INSERT_ID()` on the pinned
  connection)
- duckdb ADR 0004 (no identity column; real sequences + GUID defaults)



( run in 0.658 second using v1.01-cache-2.11-cpan-800906f7e73 )