Skip to content

2.0.9 — sparse index-by collections

Choose a tag to compare

@srmadscience srmadscience released this 27 Aug 12:50
· 5 commits to main since this release

Generates Oracle DAO, SOAP and MCP server code from a config file. This is the source drop for
2.0.9; the running article is the container image.

docker pull ghcr.io/srmadscience/mcpdbwizard:2.0.9

What is new in 2.0.9

A sparse index-by OUT collection no longer fails with ORA-01403. This affects generated DAO
code, not just MCP — regenerate to pick it up.

An index-by table is sparse by nature: PL/SQL lets a routine assign element 1 and element 7 and
nothing between. The generated code walked such a parameter from first to last index, so a gap made
it read an index that is not there — an error raised from inside the emitted block, naming neither
the parameter nor the gap.

Only parameters whose values are converted on the way out were affected. In practice that means
a high-precision NUMBER collection (one that does not fit the numeric slot, such as
number(30,15)) and RAW, which was fixed in 2.0.6. DATE and the TIMESTAMP family were already
correct; VARCHAR2 and a numerically-bound NUMBER never took that path at all.

Positions are preserved — values come back at the indexes the routine set them at, with the gaps
empty, not compacted to the front. Verified on Oracle 12c through 26ai.

How it was found, since it says something about the rest. The RAW case was fixed by comparing
the code against its neighbours, with no test that failed without the fix — nothing in the test
schema returned a sparse collection. Adding a fixture that does turned up a second unguarded type,
and now holds both in place across five Oracle releases: guard removed, the error reproduces; guard
restored, it does not.

What this repository is

The generator, its runtime library, the MCP emitter and a database-free test suite that passes on a
clean checkout. No test schema ships. You point it at your own Oracle database;
Scripts/check_provisioning.sh will tell you which objects a config expects.
examples/generated-output/ holds 107 generated .java files so you can see what the generator
emits without an Oracle instance to hand.

Honest limits

The image is not signed — no cosign or Sigstore signature, so nothing here identifies the
publisher. It carries a BuildKit provenance record and an SPDX SBOM, both self-attested by the same
party that publishes the image: useful for what is in it, not evidence of who built it.

Known issues, with a workaround for each: https://mcpdbwizard.com/docs/known-issues/