gavo.rscdef.rdinj module

RD injections: This code fetches metadata on RDs (identified by their normalised source ID) from the database and injects it into parse contexts.

In the Structure’s completeElement method, the elements can then look for injected values using ctx.getInjected(key[, default]).


a context manager that swallows exceptions the database throws when tables don’t exist.

We want that here as the tables we’re querying here (for any RD that’s being loaded) will not exist while bootstrapping.

gavo.rscdef.rdinj.injectIntoContext(ctx, rdId)[source]

fills context’s injected metadata from material from the various database tables for the RD rdId.