I'm using GetSchema to load a list of procedures from my Oracle environment, however I only see root procedures, no package procedures. Looking through the documentation though, I don't see how else they could be returned. Does anyone know if there is a filter/restriction to get package procs, or should I be calling a different object type?
Dim ObjectType= "Procedures"
Dim Options As String()
Dim ObjectsTable = OracleConnection.GetSchema(ObjectType, Options)
Sample 'Packages' Results
?RefinedPackageSchemaData(10)
Count = 12
(0): {[OWNER, #REDACTED SCHEMA NAME#]}
(1): {[OBJECT_NAME, #REDACTED PACKAGE NAME#]}
(2): {[SUBOBJECT_NAME, ]}
(3): {[OBJECT_ID, 130652]}
(4): {[DATA_OBJECT_ID, ]}
(5): {[LAST_DDL_TIME, 4/27/2015 3:52:26 PM]}
(6): {[TIMESTAMP, 2015-04-27:15:52:26]}
(7): {[STATUS, VALID]}
(8): {[TEMPORARY, N]}
(9): {[GENERATED, N]}
(10): {[SECONDARY, N]}
(11): {[CREATED, 1/9/2015 9:47:50 AM]}
The number of rows corresponds to exactly the number of packages, not package+procedure combinations
Sample 'PackageBodies' Result
?RefinedPackageBodySchemaData(10)
Count = 12
(0): {[OWNER, #REDACTED SCHEMA NAME#]}
(1): {[OBJECT_NAME, #REDACTED PACKAGE NAME#]}
(2): {[SUBOBJECT_NAME, ]}
(3): {[OBJECT_ID, 130653]}
(4): {[DATA_OBJECT_ID, ]}
(5): {[LAST_DDL_TIME, 4/27/2015 4:19:44 PM]}
(6): {[TIMESTAMP, 2015-04-27:16:19:44]}
(7): {[STATUS, VALID]}
(8): {[TEMPORARY, N]}
(9): {[GENERATED, N]}
(10): {[SECONDARY, N]}
(11): {[CREATED, 1/9/2015 9:48:02 AM]}
The number of rows corresponds to exactly the number of packages, not package+procedure combinations
It looks like the only way to do this is to query the Arguments or ProcedureParameters schema, and group the results, discarding the actual Argument/Parameter information.
I did it like this:
With a separate helper function to pivot from DataTable to a List of dictionaries: