@@ -137,53 +137,37 @@ export const ORACLE_EXECUTION_OUTPUTS = {
137137 } ,
138138} as const satisfies Record < string , OutputProperty >
139139
140- /** Output definition for the columns returned by Oracle schema introspection. */
141- const ORACLE_COLUMN_OUTPUT_PROPERTIES = {
142- name : { type : 'string' , description : 'Column name' } ,
143- type : { type : 'string' , description : 'Oracle data type, including length or precision' } ,
144- nullable : { type : 'boolean' , description : 'Whether the column allows NULL values' } ,
145- default : { type : 'string' , description : 'Default value expression' , nullable : true } ,
146- isPrimaryKey : { type : 'boolean' , description : 'Whether the column is part of the primary key' } ,
147- isForeignKey : { type : 'boolean' , description : 'Whether the column is a foreign key' } ,
148- references : {
149- type : 'object' ,
150- description : 'Cross-schema foreign key reference information' ,
151- optional : true ,
152- properties : {
153- schema : { type : 'string' , description : 'Referenced schema name' } ,
154- table : { type : 'string' , description : 'Referenced table name' } ,
155- column : { type : 'string' , description : 'Referenced column name' } ,
156- } ,
157- } ,
158- } as const satisfies Record < string , OutputProperty >
159-
160- /** Output definition for foreign key constraints returned by introspection. */
161- const ORACLE_FOREIGN_KEY_OUTPUT_PROPERTIES = {
162- column : { type : 'string' , description : 'Local column name' } ,
163- referencesSchema : { type : 'string' , description : 'Referenced schema name' } ,
164- referencesTable : { type : 'string' , description : 'Referenced table name' } ,
165- referencesColumn : { type : 'string' , description : 'Referenced column name' } ,
166- } as const satisfies Record < string , OutputProperty >
167-
168- /** Output definition for indexes returned by introspection. */
169- const ORACLE_INDEX_OUTPUT_PROPERTIES = {
170- name : { type : 'string' , description : 'Index name' } ,
171- columns : {
172- type : 'array' ,
173- description : 'Indexed columns in column-position order' ,
174- items : { type : 'string' , description : 'Column name' } ,
175- } ,
176- unique : { type : 'boolean' , description : 'Whether the index is declared UNIQUE' } ,
177- } as const satisfies Record < string , OutputProperty >
178-
179140/** Output definition for tables returned by Oracle schema introspection. */
180141export const ORACLE_TABLE_OUTPUT_PROPERTIES = {
181142 name : { type : 'string' , description : 'Table name' } ,
182143 schema : { type : 'string' , description : 'Owning Oracle schema' } ,
183144 columns : {
184145 type : 'array' ,
185146 description : 'Table columns in ordinal position order' ,
186- items : { type : 'object' , properties : ORACLE_COLUMN_OUTPUT_PROPERTIES } ,
147+ items : {
148+ type : 'object' ,
149+ properties : {
150+ name : { type : 'string' , description : 'Column name' } ,
151+ type : { type : 'string' , description : 'Oracle data type, including length or precision' } ,
152+ nullable : { type : 'boolean' , description : 'Whether the column allows NULL values' } ,
153+ default : { type : 'string' , description : 'Default value expression' , nullable : true } ,
154+ isPrimaryKey : {
155+ type : 'boolean' ,
156+ description : 'Whether the column is part of the primary key' ,
157+ } ,
158+ isForeignKey : { type : 'boolean' , description : 'Whether the column is a foreign key' } ,
159+ references : {
160+ type : 'object' ,
161+ description : 'Cross-schema foreign key reference information' ,
162+ optional : true ,
163+ properties : {
164+ schema : { type : 'string' , description : 'Referenced schema name' } ,
165+ table : { type : 'string' , description : 'Referenced table name' } ,
166+ column : { type : 'string' , description : 'Referenced column name' } ,
167+ } ,
168+ } ,
169+ } ,
170+ } ,
187171 } ,
188172 primaryKey : {
189173 type : 'array' ,
@@ -193,11 +177,30 @@ export const ORACLE_TABLE_OUTPUT_PROPERTIES = {
193177 foreignKeys : {
194178 type : 'array' ,
195179 description : 'Foreign key columns declared on the table' ,
196- items : { type : 'object' , properties : ORACLE_FOREIGN_KEY_OUTPUT_PROPERTIES } ,
180+ items : {
181+ type : 'object' ,
182+ properties : {
183+ column : { type : 'string' , description : 'Local column name' } ,
184+ referencesSchema : { type : 'string' , description : 'Referenced schema name' } ,
185+ referencesTable : { type : 'string' , description : 'Referenced table name' } ,
186+ referencesColumn : { type : 'string' , description : 'Referenced column name' } ,
187+ } ,
188+ } ,
197189 } ,
198190 indexes : {
199191 type : 'array' ,
200192 description : 'Non-primary-key indexes on the table' ,
201- items : { type : 'object' , properties : ORACLE_INDEX_OUTPUT_PROPERTIES } ,
193+ items : {
194+ type : 'object' ,
195+ properties : {
196+ name : { type : 'string' , description : 'Index name' } ,
197+ columns : {
198+ type : 'array' ,
199+ description : 'Indexed columns in column-position order' ,
200+ items : { type : 'string' , description : 'Column name' } ,
201+ } ,
202+ unique : { type : 'boolean' , description : 'Whether the index is declared UNIQUE' } ,
203+ } ,
204+ } ,
202205 } ,
203206} as const satisfies Record < string , OutputProperty >
0 commit comments