Skip to content

uc-apx schema

Statically scans every SQL and PL/SQL fragment in the app — region sources, processes, computations, validations, LOVs, dynamic actions, table-name sources, where-clauses — and reports the database objects referenced, each with a usage count. By default the per-object usage sites are omitted; use —object <name> to see where one object is used, or —detail to include them for every object.

Objects are classified heuristically by their position in the code (table/view vs. program-unit). When the app ships DDL under supporting-objects/ (install or upgrade scripts), matching CREATE statements refine the type (table, view, package, function, …) and mark the object as locally defined.

Oracle- and APEX-supplied objects (APEX_, DBMS_, HTP, data-dictionary views, DUAL, …) are excluded from the default output (the summary still reports their count); pass —builtins to list only those instead of the app’s own objects.

This is a “where do I look” aid, not an authoritative dependency graph: there is no database connection, table-vs-view is a guess without local DDL, and SQL assembled dynamically from strings is invisible to it.

uc-apx schema [flags]
FlagTypeDefaultDescription
--builtinsShow only the Oracle/APEX built-in objects (APEX_, DBMS_, HTP, dict views, …) instead of the app’s own objects
--detailInclude the per-object usage sites (where each object is used) instead of just the summary
--objectstringRestrict output to a single object by name (case-insensitive)
--typestringFilter to a single object type (table, view, package, table-or-view, program-unit, …)
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON
Terminal window
# All database objects the app touches (summary: name, type, refCount)
uc-apx --app-dir ./my-app schema
# Where is a specific table used? (its usage sites)
uc-apx --app-dir ./my-app schema --object EBA_CUST_CUSTOMERS
# Usage sites for every object (the full payload)
uc-apx --app-dir ./my-app schema --detail
# Only tables (of the app's own objects)
uc-apx --app-dir ./my-app schema --type table
# Only the Oracle/APEX built-ins the app calls
uc-apx --app-dir ./my-app schema --builtins

Running against examples/brookstrut:

Terminal window
uc-apx --app-dir examples/brookstrut schema
objects[9]{name,type,local,builtin,refCount}:
OOW_DEMO_EVENT_LOG,table,true,false,1
OOW_DEMO_GEN_DATA_PKG,package,true,false,2
OOW_DEMO_HIST_GEN_LOG,table,true,false,5
OOW_DEMO_ITEMS,table,true,false,26
OOW_DEMO_PREFERENCES,table,true,false,1
OOW_DEMO_REGIONS,table,true,false,19
OOW_DEMO_SALES_HISTORY,table,true,false,30
OOW_DEMO_STORES,table,true,false,28
OOW_DEMO_STORE_PRODUCTS,table,true,false,21
summary:
objectCount: 9
builtinCount: 18
byType:
package: 1
table: 8
note: "Heuristic static analysis of SQL/PL/SQL text — no database connection. Cannot distinguish tables from views unless the app ships their DDL, and misses dynamic SQL. Verify against the database before acting on it."
JSON output
{
"objects": [
{
"name": "OOW_DEMO_EVENT_LOG",
"type": "table",
"local": true,
"builtin": false,
"refCount": 1
},
{
"name": "OOW_DEMO_GEN_DATA_PKG",
"type": "package",
"local": true,
"builtin": false,
"refCount": 2
},
{
"name": "OOW_DEMO_HIST_GEN_LOG",
"type": "table",
"local": true,
"builtin": false,
"refCount": 5
},
{
"name": "OOW_DEMO_ITEMS",
"type": "table",
"local": true,
"builtin": false,
"refCount": 26
},
{
"name": "OOW_DEMO_PREFERENCES",
"type": "table",
"local": true,
"builtin": false,
"refCount": 1
},
{
"name": "OOW_DEMO_REGIONS",
"type": "table",
"local": true,
"builtin": false,
"refCount": 19
},
{
"name": "OOW_DEMO_SALES_HISTORY",
"type": "table",
"local": true,
"builtin": false,
"refCount": 30
},
{
"name": "OOW_DEMO_STORES",
"type": "table",
"local": true,
"builtin": false,
"refCount": 28
},
{
"name": "OOW_DEMO_STORE_PRODUCTS",
"type": "table",
"local": true,
"builtin": false,
"refCount": 21
}
],
"summary": {
"objectCount": 9,
"builtinCount": 18,
"byType": {
"package": 1,
"table": 8
},
"note": "Heuristic static analysis of SQL/PL/SQL text — no database connection. Cannot distinguish tables from views unless the app ships their DDL, and misses dynamic SQL. Verify against the database before acting on it."
}
}