Skip to main content

Module dml_edges

Module dml_edges 

Source
Expand description

Reads / Writes edge extraction at the table level.

Walks the embedded SQL statements in a lowered body and pulls out the table-level read / write dependencies. The dependency- graph layer turns each TableAccess into a Reads or Writes edge; this module does the extraction from the Statement::Sql raw text + the SqlStatementModel shape.

Read / write classification follows the SQL verb:

  • SELECT … FROM t → Read of t.
  • INSERT INTO t → Write of t; any sub-SELECT is a Read.
  • UPDATE t SET … → Write of t; the WHERE/SET sub-selects are Reads.
  • DELETE FROM t → Write of t.
  • MERGE INTO t USING s → Write of t, Read of s.

§/oracle evidence

  • DATABASE-REFERENCE.md PL/SQL Language Reference — the embedded-SQL DML grammar defers to the SQL Language Reference; the verb→access mapping above is the standard read/write classification.
  • LOW-LEVEL-CATALOGS.md Data Dictionary View Families — ALL_DEPENDENCIES (DEPENDENCY_TYPE = HARD) is the server-side mirror; the depgraph cross-checks these edges against it.

Structs§

TableAccess
One table-level access pulled from an embedded SQL statement.

Enums§

AccessKind

Functions§

extract_table_accesses
Extract table-level Read/Write accesses from every embedded SQL statement in stmts.
extract_table_accesses_bounded
Depth-bounded variant of extract_table_accesses. Returns the extracted accesses plus a [RecursionOutcome] recording whether a nested body was abandoned at the recursion-depth cap. The caller must emit an honest typed diagnostic when outcome.limit_hit (R13 — never silently truncate).