75 DBMS_DEVELOPER
パッケージDBMS_DEVELOPER
は、データベース・オブジェクトに関する情報を取得するためのシンプルで開発者が使いやすいメソッドを提供します。
この章のトピックは、次のとおりです:
75.1 DBMS_DEVELOPER概要
パッケージDBMS_DEVELOPER
には、データベース・オブジェクトに関する情報を取得するためのサブプログラムが用意されています。
DBMS_DEVELOPER
パッケージは、データベース・オブジェクトに関する関連情報を取得するための単純なメソッドを提供します。 このパッケージは、データベース内のオブジェクト、シェイプ、構造などの情報を取得したい開発者ツールや開発者に役立ちます。
DBMS_DEVELOPER
には、次の利点があります:
-
パフォーマンス : 情報は数ミリ秒以内に取得されます。
-
シンプルさ :
DBMS_DEVELOPER
は、XMLから離れて、シンプルで包括的なJSONを利用します。 このパッケージは、非特権ユーザーが読み取り権を持っているすべてのオブジェクトに関する情報を取得するメソッドを提供します。
75.2 DBMS_DEVELOPERセキュリティ
この項では、DBMS_DEVELOPER
パッケージに関連するセキュリティ制限を示します。
このファンクションは実行者権限で実行されます。 データベース・オブジェクトのメタデータへのアクセスは、そのオブジェクトで「説明」を実行する権限がある場合にのみ許可されます。 そのような認可がない場合、エラーが発生し、メタデータは取得されません。
必要な権限の概要を次に示します:
- 表およびビュー: 表またはビューに対するSELECTまたはREAD権限が必要です。
- 索引: 索引が定義されている表に対するSELECTまたはREAD権限が必要です。
- シノニム: シノニムに対するSELECTまたはREAD権限が必要です。
自分のスキーマ内のオブジェクトを記述する場合は、追加の権限は必要ありません。 ただし、別のスキーマでオブジェクトを記述する場合は、これらのオブジェクトに対するSELECT権限が少なくとも必要です。
DBAであるか、SELECT ANY TABLE、READ ANY TABLEおよびSELECT ANY VIEWシステム権限を持っている場合、明示的な付与を必要とせずに、データベース内の任意の表、索引またはビューに対してDBMS_DEVELOPER.GET_METADATA
をコールできます。
75.3 DBMS_DEVELOPERサブプログラムの要約
この表では、DBMS_DEVELOPER
サブプログラムをリストし、簡単に説明します。
次の表に、DBMS_DEVELOPER
パッケージのサブプログラムとその簡単な説明を示します。
サブプログラム | 説明 |
GET_METADATA |
このファンクションは、次のようなオブジェクトに関する情報を取得 : name 、 object_type 、 schema 、 etag は、対応するオブジェクトのメタデータを含むJSONドキュメントを生成します。 出力で生成する必要がある情報のレベルは、入力パラメータで指定できます - level .
|
75.3.1 GET_METADATAファンクション
この項では、GET_METADATA
ファンクションの構文、入出力形式について説明します。
このファンクションは、オブジェクトに関する情報を取得し、そのオブジェクトの対応するメタデータを含むJSONドキュメントを生成します。
構文
DBMS_DEVELOPER.GET_METADATA (
name IN VARCHAR2,
schema IN VARCHAR2 DEFAULT NULL,
object_type IN VARCHAR2 DEFAULT NULL,
level IN VARCHAR2 DEFAULT 'TYPICAL'
etag IN RAW DEFAULT NULL)
RETURN JSON;
表75-1 入力構成フィールド
フィールド | 値 |
---|---|
|
オブジェクト名。 オブジェクト名のシノニムも指定できます。 これは大/小文字が区別されるため、データ・ディクショナリに表示されるとおりに指定する必要があります。 |
|
スキーマ名。 デフォルトは現行ユーザーです。 これは大/小文字が区別されるため、データ・ディクショナリに表示されるとおりに指定する必要があります。 |
|
取り出すオブジェクトのタイプ。 これはオプションです。 サポートされている値: |
|
詳細のレベル。 デフォルトは サポートされる値:
|
|
特定のバージョンのドキュメントの一意の識別子。 この
|
GET_METADATA
ファンクションは、JSONスキーマを返さず、JSONドキュメントを返します。 取得するメタデータのレベルに応じて、GET_METADATA
ファンクションの適切なパラメータを使用して、必要なメタデータJSONドキュメントを取得できます。
アプリケーションに必要なスキーマを理解するには、「異なるオブジェクト型およびサブオブジェクト型のJSONスキーマ」を参照してください。
例
object_type
およびlevel
の異なる値に対するDBMS_DEVELOPER.GET_METADATA
の使用例を示します。
BASIC
に設定され、object_type
がTABLE
に設定されたlevel
のメタデータの取得 :SQL> conn hr/hr Connected. SQL> SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'TABLE', name => 'REGIONS', level => 'BASIC');
この問合せを実行すると、次のJSONドキュメントが生成されます:
{ "objectType" : "TABLE", "objectInfo" : { "name" : "REGIONS", "schema" : "HR", "columns" : [ { "name" : "REGION_ID", "notNull" : true, "dataType" : { "type" : "NUMBER" } }, { "name" : "REGION_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } } ] }, "etag" : "9ADC6D08AE0D5C82C0188D53F3ECD5B9" }
TYPICAL
に設定され、object_type
がVIEW
に設定されたlevel
のメタデータの取得 :SQL> conn hr/hr Connected. SQL> SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'VIEW', name => 'EMP_DETAILS_VIEW', level => 'TYPICAL');
この問合せを実行すると、次のJSONドキュメントが生成されます:
{ "objectType" : "VIEW", "objectInfo" : { "name" : "EMP_DETAILS_VIEW", "schema" : "HR", "columns" : [ { "name" : "EMPLOYEE_ID", "notNull" : true, "dataType" : { "type" : "NUMBER", "precision" : 6 } }, { "name" : "JOB_ID", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 10, "sizeUnits" : "BYTE" } }, { "name" : "MANAGER_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 6 } }, { "name" : "DEPARTMENT_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 4 } }, { "name" : "LOCATION_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 4 } }, { "name" : "COUNTRY_ID", "notNull" : false, "dataType" : { "type" : "CHAR", "length" : 2, "sizeUnits" : "BYTE" } }, { "name" : "FIRST_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 20, "sizeUnits" : "BYTE" } }, { "name" : "LAST_NAME", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } }, { "name" : "SALARY", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 8, "scale" : 2 } }, { "name" : "COMMISSION_PCT", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 2, "scale" : 2 } }, { "name" : "DEPARTMENT_NAME", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 30, "sizeUnits" : "BYTE" } }, { "name" : "JOB_TITLE", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 35, "sizeUnits" : "BYTE" } }, { "name" : "CITY", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 30, "sizeUnits" : "BYTE" } }, { "name" : "STATE_PROVINCE", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } }, { "name" : "COUNTRY_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 40, "sizeUnits" : "BYTE" } }, { "name" : "REGION_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } } ], "readOnly" : true, "dualityView" : false, "constraints" : [ { "name" : "SYS_C008649", "constraintType" : "VIEW READONLY", "status" : "ENABLE", "deferrable" : false, "validated" : "NON VALIDATED", "sysGeneratedName" : true } ] }, "etag" : "30CA19323E091D7423842D366B727473" }
ALL
に設定され、object_type
がVIEW
に設定されたlevel
のメタデータの取得 :SQL> conn hr/hr Connected. SQL> SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'VIEW', name => 'EMP_DETAILS_VIEW', level => 'ALL');
{ "objectType" : "VIEW", "objectInfo" : { "name" : "EMP_DETAILS_VIEW", "schema" : "HR", "columns" : [ { "name" : "EMPLOYEE_ID", "notNull" : true, "dataType" : { "type" : "NUMBER", "precision" : 6 } }, { "name" : "JOB_ID", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 10, "sizeUnits" : "BYTE" } }, { "name" : "MANAGER_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 6 } }, { "name" : "DEPARTMENT_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 4 } }, { "name" : "LOCATION_ID", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 4 } }, { "name" : "COUNTRY_ID", "notNull" : false, "dataType" : { "type" : "CHAR", "length" : 2, "sizeUnits" : "BYTE" } }, { "name" : "FIRST_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 20, "sizeUnits" : "BYTE" } }, { "name" : "LAST_NAME", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } }, { "name" : "SALARY", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 8, "scale" : 2 } }, { "name" : "COMMISSION_PCT", "notNull" : false, "dataType" : { "type" : "NUMBER", "precision" : 2, "scale" : 2 } }, { "name" : "DEPARTMENT_NAME", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 30, "sizeUnits" : "BYTE" } }, { "name" : "JOB_TITLE", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 35, "sizeUnits" : "BYTE" } }, { "name" : "CITY", "notNull" : true, "dataType" : { "type" : "VARCHAR2", "length" : 30, "sizeUnits" : "BYTE" } }, { "name" : "STATE_PROVINCE", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } }, { "name" : "COUNTRY_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 40, "sizeUnits" : "BYTE" } }, { "name" : "REGION_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" } } ], "readOnly" : true, "dualityView" : false, "constraints" : [ { "name" : "SYS_C008649", "constraintType" : "VIEW READONLY", "status" : "ENABLE", "deferrable" : false, "validated" : "NON VALIDATED", "sysGeneratedName" : true } ], "editioningView" : false, "authorizations" : [ { "grantee" : "SCOTT", "privileges" : [ { "name" : "SELECT", "grantable" : false }, { "name" : "READ", "grantable" : false } ] } ] }, "etag" : "B90C4AE92788116F695ADC2A1CB2859F" }
ALL
に設定され、object_type
がINDEX
に設定されたlevel
のメタデータの取得 :SQL> conn hr/hr Connected. SQL> SQL> select DBMS_DEVELOPER.GET_METADATA(object_type => 'INDEX', name => 'EMP_EMP_ID_PK', level => 'ALL');
この問合せを実行すると、次のJSONドキュメントが生成されます:
{ "objectType" : "INDEX", "objectInfo" : { "indexType" : "NORMAL", "partitioned" : false, "columns" : [ { "dataType" : { "type" : "NUMBER", "precision" : 6 }, "isPk" : true, "hiddenColumn" : false, "numDistinct" : 107, "isUk" : true, "highValue" : "C20307", "isFk" : false, "lowValue" : "C202", "density" : 0.00934579439252336, "notNull" : true, "name" : "EMPLOYEE_ID", "avgColLen" : 4 } ], "uniqueness" : "UNIQUE", "numRows" : 107, "toBeDropped" : false, "lastAnalyzed" : "2025-01-09T20:36:23", "sampleSize" : 107, "segmentCreated" : "YES", "distinctKeys" : 107, "owner" : "HR", "visibility" : "VISIBLE", "name" : "EMP_EMP_ID_PK", "status" : "VALID", "compression" : "DISABLED", "tableName" : "EMPLOYEES" }, "etag" : "DFCF4C9591CD233EE746E129E875A43B" }
level
およびobject_type
が明示的に指定されていないメタデータの取得:SQL> conn hr/hr Connected. SQL> SQL> select dbms_developer.get_metadata(name => 'REGIONS');
object_type
が指定されていない場合でも、名前解決はフードの下で実行されます。name => 'EMPLOYEES'
に対応する名前object_type
は、table
と判断されます。 そのため、JSONドキュメントは、table object_type
のデフォルトのtypical level
で生成されます。 上記の例に対応する出力JSONドキュメントを次に示します :{ "objectType" : "TABLE", "objectInfo" : { "schema" : "HR", "columns" : [ { "name" : "REGION_ID", "notNull" : true, "dataType" : { "type" : "NUMBER" }, "isPk" : true, "isUk" : true, "isFk" : false }, { "name" : "REGION_NAME", "notNull" : false, "dataType" : { "type" : "VARCHAR2", "length" : 25, "sizeUnits" : "BYTE" }, "isPk" : false, "isUk" : false, "isFk" : false } ], "numRows" : 4, "external" : "NO", "constraints" : [ { "name" : "REGION_ID_NN", "constraintType" : "CHECK - NOT NULL", "searchCondition" : "\"REGION_ID\" IS NOT NULL", "columns" : [ { "name" : "REGION_ID" } ], "status" : "ENABLE", "deferrable" : false, "validated" : "VALIDATED", "sysGeneratedName" : false }, { "name" : "REG_ID_PK", "constraintType" : "PRIMARY KEY", "columns" : [ { "name" : "REGION_ID" } ], "status" : "ENABLE", "deferrable" : false, "validated" : "VALIDATED", "sysGeneratedName" : false } ], "lastAnalyzed" : "2025-01-09T20:36:38", "sampleSize" : 4, "indexes" : [ { "name" : "REG_ID_PK", "indexType" : "NORMAL", "uniqueness" : "UNIQUE", "status" : "VALID", "lastAnalyzed" : "2025-01-09T20:36:39", "numRows" : 4, "sampleSize" : 4, "partitioned" : false, "columns" : [ { "name" : "REGION_ID" } ] } ], "avgRowLen" : 14, "name" : "REGIONS", "temporary" : "NO" }, "etag" : "20731DA3DCF5DA125C127B88BFB645EA" }
- 指定された
etag
が現在のetag
と一致した場合にメタデータを取得すると、空のドキュメントが返されます :SQL> conn hr/hr Connected. SQL> SQL> select dbms_developer.get_metadata(name => 'REGIONS', etag => '20731DA3DCF5DA125C127B88BFB645EA');
この問合せを実行すると、空のJSONドキュメントが生成されます :{ }
75.3.1.1 異なるオブジェクト型およびサブオブジェクト型のJSONスキーマ
この項では、様々なオブジェクト・タイプ、サブオブジェクト・タイプおよびレベルで可能な様々なスキーマの概要を示します。
JSONスキーマは、返されるJSONドキュメントを解析するためのアプリケーションによる参照として使用できます。 特定のバージョンのデータベース・プログラムに対してプログラミングする場合は、そのデータベース・バージョンに対してその特定のバージョンのJSONスキーマを使用し、そのスキーマは常に同じになります。 ただし、別のリリースにアップグレードまたはダウングレードする場合は、別のスキーマ・バージョンを使用し、その正しいスキーマを使用する必要があります。 スキーマに変更がある場合は、$id
フィールドのバージョン番号が変更されます。 Oracleが将来JSONスキーマを改訂する予定の場合、アプリケーションではこの数値を信頼できます。 既存のバージョンは変更されないため、アプリケーションは完全に機能し、更新の影響を受けません。
- すべてのレベルでの
object_type
TABLE
のJSONスキーマの詳細は、この項で説明しています : オブジェクト型のJSONスキーマ :TABLE
- すべてのレベルでの
object_type
INDEX
のJSONスキーマの詳細は、この項で説明しています : オブジェクト型のJSONスキーマ :INDEX
- すべてのレベルでの
object_type
VIEW
のJSONスキーマの詳細は、この項で説明しています : オブジェクト型のJSONスキーマ :VIEW
- すべてのレベルのサブオブジェクト型
COLUMNS
のJSONスキーマの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : 列 - すべてのレベルのサブオブジェクト型
CONSTRAINTS
のJSONスキーマの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : 制約
75.3.1.1.1 オブジェクト型のJSONスキーマ : TABLE
この項では、すべてのレベルのオブジェクト型TABLE
のJSONスキーマについて説明します。
表形式フォームのTABLE
オブジェクト・タイプのJSONスキーマ
表75-2 オブジェクト型のJSONスキーマ : TABLE
FIELDS | LEVELS | ||||
---|---|---|---|---|---|
BASIC | TYPICAL | ALL | |||
name |
✔ | ✔ | ✔ | ||
schema |
✔ | ✔ | ✔ | ||
columns |
✔ | ✔ | ✔ | ||
hasBeenAnalyzed |
✔ | ✔ | |||
lastAnalyzed |
✔ | ✔ | |||
numRows |
✔ | ✔ | |||
sampleSize |
✔ | ✔ | |||
avgRowLen |
✔ | ✔ | |||
clusterName |
✔ | ✔ | |||
clusterOwner |
✔ | ✔ | |||
外部 |
✔ | ✔ | |||
一時 |
✔ | ✔ | |||
索引 |
✔ | ✔ | |||
制約 |
✔ | ✔ | |||
annotations |
✔ | ✔ | |||
segmentCreated |
✔ | ||||
inMemory |
✔ | ||||
圧縮 |
✔ | ||||
dependencies |
✔ | ||||
認可 |
grantee | ✔ | |||
権限 | name | ||||
付与可能 | |||||
inMemoryPriority |
✔ | ||||
inMemoryDistribute |
✔ | ||||
inMemoryCompression |
✔ | ||||
inMemoryDuplicate |
✔ | ||||
iotType |
✔ |
ノート:
サブオブジェクトcolumns
およびconstraints
のフィールドは、level
の選択に応じて異なります。 サブオブジェクトcolumns
に存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns
. サブオブジェクトconstraints
に存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : constraints
.
level
BASIC
のTABLE
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/table",
"title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/TABLE",
"description": "Information for a table object",
"type": "object",
"properties": {
"name": {
"description": "Table name",
"type": "string"
},
"schema": {
"description": "Table schema",
"type": "string"
},
"columns": {
"description": "Table columns",
"type": "array",
"items": {
"$ref": "../column"
}
}
},
"required": [
"name",
"schema",
"columns"
]
}
level
TYPICAL
のTABLE
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/table",
"title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/TABLE",
"description": "Information for a table object",
"type": "object",
"properties": {
"name": {
"description": "Table name",
"type": "string"
},
"schema": {
"description": "Table schema",
"type": "string"
},
"columns": {
"description": "Table columns",
"type": "array",
"items": {
"$ref": "../column"
}
},
"hasBeenAnalyzed": {
"description": "Indicates whether table has been analyzed",
"type": "boolean",
"default": false
},
"lastAnalyzed": {
"description": "Last time table was analyzed",
"type": "string",
"format": "date-time"
},
"numRows": {
"description": "Number of rows",
"type": "integer"
},
"sampleSize": {
"description": "Analyzed sample size",
"type": "integer"
},
"avgRowLen": {
"description": "Average row length",
"type": "integer"
},
"clusterName": {
"description": "Name of the cluster, if any, to which the table belongs",
"type": "string"
},
"clusterOwner": {
"description": "Owner of the cluster, if any, to which the table belongs",
"type": "string"
},
"external": {
"description": "Indicates whether the table is an external table (YES) or not (NO)",
"type": "string"
},
"temporary": {
"description": "Indicates whether the table is temporary (YES) or not (NO)",
"type": "string"
},
"indexes": {
"description": "Table indexes",
"type": "array",
"items": {
"$ref": "../index"
}
},
"constraints": {
"description": "Table constraints",
"type": "array",
"items": {
"$ref": "../constraint"
}
},
"annotations": {
"description": "Table annotations",
"type": "array",
"items": {
"$ref": "../annotation"
}
}
},
"required": [
"name",
"schema",
"columns",
"external",
"temporary"
]
}
level
ALL
のTABLE
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/table",
"title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/TABLE",
"description": "Information for a table object",
"type": "object",
"properties": {
"name": {
"description": "Table name",
"type": "string"
},
"schema": {
"description": "Table schema",
"type": "string"
},
"columns": {
"description": "Table columns",
"type": "array",
"items": {
"$ref": "../column"
}
},
"hasBeenAnalyzed": {
"description": "Indicates whether table has been analyzed",
"type": "boolean",
"default": false
},
"lastAnalyzed": {
"description": "Last time table was analyzed",
"type": "string",
"format": "date-time"
},
"numRows": {
"description": "Number of rows",
"type": "integer"
},
"sampleSize": {
"description": "Analyzed sample size",
"type": "integer"
},
"avgRowLen": {
"description": "Average row length",
"type": "integer"
},
"clusterName": {
"description": "Name of the cluster, if any, to which the table belongs",
"type": "string"
},
"clusterOwner": {
"description": "Owner of the cluster, if any, to which the table belongs",
"type": "string"
},
"external": {
"description": "Indicates whether the table is an external table (YES) or not (NO)",
"type": "string"
},
"temporary": {
"description": "Indicates whether the table is temporary (YES) or not (NO)",
"type": "string"
},
"indexes": {
"description": "Table indexes",
"type": "array",
"items": {
"$ref": "../index"
}
},
"constraints": {
"description": "Table constraints",
"type": "array",
"items": {
"$ref": "../constraint"
}
},
"annotations": {
"description": "Table annotations",
"type": "array",
"items": {
"$ref": "../annotation"
}
},
"segmentCreated": {
"description": "Indicates whether the table segment is created.",
"type": "string"
},
"inMemory": {
"description": "Indicates whether the In-Memory Column Store (IM column store)
is enabled (ENABLED) or disabled (DISABLED) for the table",
"type": "string"
},
"compression": {
"description": "Indicates whether table compression is enabled (ENABLED) or not (DISABLED)",
"type": "string"
},
"dependencies": {
"description": "Indicates whether the table is an external table (YES) or not (NO)",
"type": "string"
},
"authorizations": {
"description": "Table authorizations",
"type": "object",
"properties": {
"grantee": {
"description": "Name of the user to whom access was granted",
"type": "string"
},
"privileges": {
"description": "All privileges granted to grantee",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Privilege on the object,
"type": "string"
},
"grantable": {
"description": "Indicates whether the privilege was granted with the GRANT OPTION",
"type": "string"
}
}
}
}
}
},
"inMemoryPriority": {
"description": "Indicates the priority for In-Memory Column Store (IM column store) population. ",
"type": "string"
},
"inMemoryDistribute": {
"description": "Indicates how the IM column store is distributed in an
Oracle Real Application Clusters (Oracle RAC) environment",
"type": "string"
},
"inMemoryCompression": {
"description": "Indicates the compression level for the IM column store",
"type": "string"
},
"inMemoryDuplicate": {
"description": "Indicates the duplicate setting for the IM column store in an Oracle RAC environment",
"type": "string"
},
"iotType": {
"description": "If the table is an index-organized table, then IOT_TYPE is IOT,
IOT_OVERFLOW, or IOT_MAPPING. If the table is not an index-organized table,
then IOT_TYPE is NULL.",
"type": "string"
}
},
"required": [
"name",
"schema",
"columns",
"external",
"temporary",
"inMemory",
"compression",
"dependencies",
"segmentCreated"
]
}
75.3.1.1.2 オブジェクト型のJSONスキーマ : VIEW
この項では、すべてのレベルのオブジェクト型VIEW
のJSONスキーマについて説明します。
表形式フォームのVIEW
オブジェクト・タイプのJSONスキーマ
表75-3 VIEWオブジェクト・タイプのJSONスキーマ
フィールド | LEVELS | ||||
---|---|---|---|---|---|
BASIC | TYPICAL | ALL | |||
name |
✔ | ✔ | ✔ | ||
schema |
✔ | ✔ | ✔ | ||
columns |
✔ | ✔ | ✔ | ||
readOnly |
✔ | ✔ | |||
dualityView |
✔ | ✔ | |||
制約 |
✔ | ✔ | |||
annotations |
✔ | ✔ | |||
editioningView |
✔ | ||||
認可 |
grantee |
✔ | |||
権限 |
name | ||||
付与可能 |
ノート:
サブオブジェクトcolumns
およびconstraints
のフィールドは、level
の選択に応じて異なります。 サブオブジェクトcolumns
に存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns
. サブオブジェクトconstraints
に存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : constraints
.
level
BASIC
のVIEW
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/view",
"title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/VIEW",
"description": "Information for a View object",
"type": "object",
"properties": {
"name": {
"description": "View name",
"type": "string"
},
"schema": {
"description": "View schema",
"type": "string"
},
"columns": {
"description": "View columns",
"type": "array",
"items": {
"$ref": "../column"
}
}
},
"required": [
"name",
"schema",
"columns"
]
}
level
TYPICAL
のVIEW
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/view",
"title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/VIEW",
"description": "Information for a View object",
"type": "object",
"properties": {
"name": {
"description": "View name",
"type": "string"
},
"schema": {
"description": "View schema",
"type": "string"
},
"columns": {
"description": "View columns",
"type": "array",
"items": {
"$ref": "../column"
}
},
"readOnly": {
"description": "An indicator of whether the view is a Read Only View",
"type": "boolean",
"default": true
},
"dualityView": {
"description": "Whether the view is a JSON Duality View or not",
"type": "boolean",
"default": false
},
"constraints": {
"description": "View constraints",
"type": "array",
"items": {
"$ref": "../constraint"
}
} ,
"annotations": {
"description": "View annotations",
"type": "array",
"items": {
"$ref": "../annotation"
}
}
},
"required": [
"name",
"schema",
"readOnly",
"dualityView",
"columns"
]
}
level
ALL
のVIEW
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/view",
"title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/VIEW",
"description": "Information for a View object",
"type": "object",
"properties": {
"name": {
"description": "View name",
"type": "string"
},
"schema": {
"description": "View schema",
"type": "string"
},
"columns": {
"description": "View columns",
"type": "array",
"items": {
"$ref": "../column"
}
},
"readOnly": {
"description": "An indicator of whether the view is a Read Only View",
"type": "boolean",
"default": true
},
"dualityView": {
"description": "Whether the view is a JSON Duality View or not",
"type": "boolean",
"default": false
},
"constraints": {
"description": "View constraints",
"type": "array",
"items": {
"$ref": "../constraint"
}
},
"annotations": {
"description": "View annotations",
"type": "array",
"items": {
"$ref": "../annotation"
}
},
"editioningView": {
"description": "An indicator of whether the view is an Editioning view",
"type": "boolean",
"default": false
},
"authorizations": {
"description": "View authorizations",
"type": "object",
"properties": {
"grantee": {
"description": "Name of the user to whom access was granted",
"type": "string"
},
"privileges": {
"description": "All privileges granted to grantee",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Privilege on the object,
"type": "string"
},
"grantable": {
"description": "Indicates whether the privilege was granted with the GRANT OPTION",
"type": "string"
}
}
}
}
}
}
},
"required": [
"name",
"schema",
"columns"
]
}
75.3.1.1.3 オブジェクト型のJSONスキーマ : INDEX
この項では、すべてのレベルのオブジェクト型INDEX
のJSONスキーマについて説明します。
表形式フォームのINDEX
オブジェクト・タイプのJSONスキーマ
表75-4 INDEXオブジェクト・タイプのJSONスキーマ
フィールド | LEVELS | ||||
---|---|---|---|---|---|
BASIC | TYPICAL | ALL | |||
name | ✔ | ✔ | ✔ | ||
indexType | ✔ | ✔ | ✔ | ||
owner | ✔ | ✔ | ✔ | ||
tableName | ✔ | ✔ | ✔ | ||
status | ✔ | ✔ | ✔ | ||
columns | ✔ | ✔ | ✔ | ||
一意性 | ✔ | ✔ | |||
funcIdxStatus | ✔ | ✔ | |||
hasBeenAnalyzed | ✔ | ✔ | |||
lastAnalyzed | ✔ | ✔ | |||
numRows | ✔ | ✔ | |||
sampleSize | ✔ | ✔ | |||
annotations | ✔ | ✔ | |||
partitioned | ✔ | ✔ | |||
distinctKeys | ✔ | ||||
圧縮 | ✔ | ||||
segmentCreated | ✔ | ||||
visibility | ✔ | ||||
toBeDropped | ✔ |
ノート:
サブオブジェクトcolumns
のフィールドは、level
の選択に応じて異なります。 サブオブジェクトcolumns
に存在するフィールドの詳細は、この項を参照してください : サブオブジェクト型のJSONスキーマ : columns
.
level
BASIC
のINDEX
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/index",
"title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/INDEX",
"description": "Information for index",
"type": "object",
"properties": {
"name": {
"description": "Index name",
"type": "string"
},
"indexType": {
"description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB, IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV, FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
"type": "string"
},
"owner": {
"description": "Owner of the indexed object",
"type": "string"
},
"tableName": {
"description": "Name of the indexed object",
"type": "string"
},
"status": {
"description": "Status",
"type": {
"enum": [
"VALID",
"UNUSABLE",
"INPROGRS",
"N/A"
]
}
},
"columns": {
"description": "Index column(s)",
"type": "array",
"items": {
"$ref": "../column"
}
}
},
"required": [
"name",
"indexType",
"owner",
"tableName",
"status",
"columns"
]
}
level
TYPICAL
のINDEX
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/index",
"title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/INDEX",
"description": "Information for index",
"type": "object",
"properties": {
"name": {
"description": "Index name",
"type": "string"
},
"indexType": {
"description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB, IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV, FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
"type": "string"
},
"owner": {
"description": "Owner of the indexed object",
"type": "string"
},
"tableName": {
"description": "Name of the indexed object",
"type": "string"
},
"status": {
"description": "Status",
"type": {
"enum": [
"VALID",
"INVALID",
"INPROGRS",
"N/A"
]
}
},
"columns": {
"description": "Index column(s)",
"type": "array",
"items": {
"$ref": "../column"
}
},
"uniqueness": {
"description": "Uniqueness",
"type": "string",
"enum": [
"UNIQUE",
"NONUNIQUE"
]
},
"funcIdxStatus": {
"description": "Functional index status",
"type": "string"
},
"hasBeenAnalyzed": {
"description": "Indicates whether index has been analyzed",
"type": "boolean",
"default": false
},
"lastAnalyzed": {
"description": "Last time View was analyzed",
"type": "string",
"format": "date-time"
},
"numRows": {
"description": "Number of rows",
"type": "integer"
},
"sampleSize": {
"description": "Analyzed sample size",
"type": "integer"
},
"partitioned": {
"description": "Indicates whether the index is partitioned",
"type": "boolean",
"default": false
},
"annotations": {
"description": "Index annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
},
"required": [
"name",
"indexType",
"owner",
"tableName",
"status",
"columns"
]
}
}
level
ALL
のINDEX
オブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/index",
"title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/INDEX",
"description": "Information for index",
"type": "object",
"properties": {
"name": {
"description": "Index name",
"type": "string"
},
"indexType": {
"description": "Index Types i.e. CLUSTER, NORMAL, NORMAL/REV, BITMAP, DOMAIN, LOB,
IOT - TOP, FUNCTION-BASED NORMAL, FUNCTION-BASED NORMAL/REV,
FUNCTION-BASED BITMAP, FUNCTION-BASED DOMAIN, VECTOR",
"type": "string"
},
"owner": {
"description": "Owner of the indexed object",
"type": "string"
},
"tableName": {
"description": "Name of the indexed object",
"type": "string"
},
"status": {
"description": "Status",
"type": {
"enum": [
"VALID",
"INVALID",
"INPROGRS",
"N/A"
]
}
},
"columns": {
"description": "Index column(s)",
"type": "array",
"items": {
"$ref": "../column"
}
},
"uniqueness": {
"description": "Uniqueness",
"type": "string",
"enum": [
"UNIQUE",
"NONUNIQUE"
]
},
"funcIdxStatus": {
"description": "Functional index status",
"type": "string"
},
"hasBeenAnalyzed": {
"description": "Indicates whether index has been analyzed",
"type": "boolean",
"default": false
},
"lastAnalyzed": {
"description": "Last time View was analyzed",
"type": "string",
"format": "date-time"
},
"numRows": {
"description": "Number of rows",
"type": "integer"
},
"sampleSize": {
"description": "Analyzed sample size",
"type": "integer"
},
"partitioned": {
"description": "Indicates whether the index is partitioned",
"type": "boolean",
"default": false
},
"annotations": {
"description": "Index annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
},
"distinctKeys": {
"description": "Number of distinct keys in the index",
"type": "integer"
},
"compression": {
"description": "Compression property of the index: ENABLED, DISABLED, ADVANCED HIGH, ADVANCED LOW",
"type": "string",
"enum": [
"ENABLED",
"DISABLED",
"ADVANCED HIGH",
"ADVANCED LOW"
]
},
"segmentCreated": {
"description": "Whether the index segment has been created",
"type": "string",
"enum": [
"YES",
"NO",
"N/A"
]
},
"visibility": {
"description": "Whether the index is VISIBLE or INVISIBLE to the optimizer",
"type": "string",
"enum": [
"VISIBLE",
"INVISIBLE"
]
},
"toBeDropped": {
"description": "Whether index is dropped and is in Recycle Bin",
"type": "boolean"
}
},
"required": [
"name",
"indexType",
"owner",
"tableName",
"status",
"columns",
"partitioned"
"compression",
"segmentCreated",
"visibility",
"tobeDropped"
]
}
75.3.1.1.4 サブオブジェクト型のJSONスキーマ : columns
レベルのサブオブジェクトcolumns
のJSONスキーマ: basic
、typical
およびall
。
表形式フォームのcolumns
サブオブジェクト・タイプのJSONスキーマ
表75-5 COLUMNSサブオブジェクトのJSONスキーマ
フィールド | レベル | |||
---|---|---|---|---|
BASIC | TYPICAL | ALL | ||
name | ✔ | ✔ | ✔ | |
default | ✔ | ✔ | ✔ | |
notNull | ✔ | ✔ | ✔ | |
dataType | type | ✔ | ✔ | ✔ |
precision | ||||
length | ||||
scale | ||||
size | ||||
sizeUnits | ||||
fractionalSecondsPrecision | ||||
yearPrecision | ||||
dayPrecision | ||||
isPk | ✔ | ✔ | ||
isUk | ✔ | ✔ | ||
isFk | ✔ | ✔ | ||
domain | name | ✔ | ✔ | |
type | ||||
display | ||||
order | ||||
annotations | ||||
annotations | ✔ | ✔ | ||
numDistinct | ✔ | |||
lowValue | ✔ | |||
highValue | ✔ | |||
密度 | ✔ | |||
avgColLen | ✔ | |||
hiddenColumn | ✔ | |||
virtualColumn | ||||
reservableColumn | ||||
identityColumn | ||||
encryptedColumn |
ノート:
type
フィールドの値に基づいて、特定のフィールドが必須です。 次の表に、各type
値の必須フィールドを示します。
|
対応する必須列 |
NUMBER |
precision およびscale |
FLOAT |
precision |
VARCHAR2 |
size およびsizeUnits |
RAW |
size |
CHAR |
size およびsizeUnits |
NCHAR |
size |
UROWID |
size |
NVARCHAR2 |
size |
TIMESTAMP 、TIMESTAMP WITH TIME ZONE またはTIMESTAMP WITH LOCAL TIME ZONE |
fractionalSecondsPrecision |
INTERVAL YEAR TO MONTH |
yearPrecision |
INTERVAL DAY TO SECOND |
yearPrecision およびfractionalSecondsPrecision |
level
BASIC
のCOLUMN
サブオブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/BASIC/object_info/column",
"title": "DBMS_DEVELOPER.GET_METADATA/BASIC/OBJECT_INFO/COLUMN",
"description": "Information for column",
"type": "object",
"properties": {
"name": {
"description": "Column name",
"type": "string"
},
"notNull": {
"description": "Not null",
"type": "boolean",
"default": false
},
"default": {
"description": "Default value",
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"dataType": {
"description": "Datatype",
"type": "object",
"properties": {
"type": {
"description": "dataType",
"type": "string"
},
"precision": {
"description": "precision",
"type": "integer",
"minimum": 1
},
"scale": {
"description": "scale",
"type": "integer",
"minimum": 0
},
"length": {
"description": "length",
"type": "integer",
"minimum": 0
},
"size": {
"description": "size",
"type": "integer",
"minimum": 1
},
"sizeUnits": {
"description": "varchar size units",
"type": "string",
"enum": [
"BYTE",
"CHAR"
]
},
"fractionalSecondsPrecision": {
"description": "fractionalSecondsPrecision",
"type": "integer"
},
"yearPrecision": {
"description": "yearPrecision",
"type": "integer"
},
"dayPrecision": {
"description": "dayPrecision",
"type": "integer"
}
},
"anyOf": [
{
"if": {
"properties": {
"type": {
"const": "NUMBER"
}
}
},
"then": {
"required": [
"precision",
"scale"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "FLOAT"
}
}
},
"then": {
"required": [
"precision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "VARCHAR2"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "RAW"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "CHAR"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NCHAR"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "UROWID"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NVARCHAR2"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"enum": [
"TIME",
"TIME WITH TIMEZONE",
"TIMESTAMP",
"TIMESTAMP WITH TIME ZONE",
"TIMESTAMP WITH LOCAL TIME ZONE"
]
}
}
},
"then": {
"required": [
"fractionalSecondsPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL YEAR TO MONTH"
}
}
},
"then": {
"required": [
"yearPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL DAY TO SECOND"
}
}
},
"then": {
"required": [
"dayPrecision",
"fractionalSecondsPrecision"
]
}
}
]
}
},
"required": [
"name",
"dataType",
"notNull"
]
}
level
TYPICAL
のCOLUMN
サブオブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/column",
"title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/COLUMN",
"description": "Information for column",
"type": "object",
"properties": {
"name": {
"description": "Column name",
"type": "string"
},
"default": {
"description": "Default value",
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"notNull": {
"description": "Not null",
"type": "boolean",
"default": false
},
"dataType": {
"description": "Datatype",
"type": "object",
"properties": {
"type": {
"description": "dataType",
"type": "string"
},
"precision": {
"description": "precision",
"type": "integer",
"minimum": 1
},
"scale": {
"description": "scale",
"type": "integer",
"minimum": 0
},
"length": {
"description": "length",
"type": "integer",
"minimum": 0
},
"size": {
"description": "size",
"type": "integer",
"minimum": 1
},
"sizeUnits": {
"description": "varchar size units",
"type": "string",
"enum": [
"BYTE",
"CHAR"
]
},
"fractionalSecondsPrecision": {
"description": "fractionalSecondsPrecision",
"type": "integer"
},
"yearPrecision": {
"description": "yearPrecision",
"type": "integer"
},
"dayPrecision": {
"description": "dayPrecision",
"type": "integer"
}
},
"anyOf": [
{
"if": {
"properties": {
"type": {
"const": "NUMBER"
}
}
},
"then": {
"required": [
"precision",
"scale"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "FLOAT"
}
}
},
"then": {
"required": [
"precision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "VARCHAR2"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "RAW"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "CHAR"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NCHAR"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "UROWID"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NVARCHAR2"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"enum": [
"TIME",
"TIME WITH TIMEZONE",
"TIMESTAMP",
"TIMESTAMP WITH TIME ZONE",
"TIMESTAMP WITH LOCAL TIME ZONE"
]
}
}
},
"then": {
"required": [
"fractionalSecondsPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL YEAR TO MONTH"
}
}
},
"then": {
"required": [
"yearPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL DAY TO SECOND"
}
}
},
"then": {
"required": [
"dayPrecision",
"fractionalSecondsPrecision"
]
}
}
]
},
"isPk": {
"description": "Is Primary Key",
"type": "boolean",
"default": false
},
"isUk": {
"description": "Is Unique Key",
"type": "boolean",
"default": false
},
"isFk": {
"description": "Is Foreign Key",
"type": "boolean",
"default": false
},
"domain": {
"description": "Column domain",
"type": "object",
"properties": {
"name": {
"description": "Domain name",
"type": "string"
},
"type": {
"description": "Domain type",
"type": "string"
},
"dislplay": {
"description": "Domain display",
"type": "string"
},
"order": {
"description": "Domain order",
"type": "string"
},
"annotations": {
"description": "Column domain annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
}
}
},
"annotations": {
"description": "Column annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
}
},
"required": [
"name",
"isPk",
"isUk",
"isFk",
"dataType",
"notNull"
]
}
level
ALL
のCOLUMN
サブオブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/column",
"title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/COLUMN",
"description": "Information for column",
"type": "object",
"properties": {
"name": {
"description": "Column name",
"type": "string"
},
"default": {
"description": "Default value",
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"notNull": {
"description": "Not null",
"type": "boolean",
"default": false
},
"dataType": {
"description": "Datatype",
"type": "object",
"properties": {
"type": {
"description": "dataType",
"type": "string"
},
"precision": {
"description": "precision",
"type": "integer",
"minimum": 1
},
"scale": {
"description": "scale",
"type": "integer",
"minimum": 0
},
"length": {
"description": "length",
"type": "integer",
"minimum": 0
},
"size": {
"description": "size",
"type": "integer",
"minimum": 1
},
"sizeUnits": {
"description": "varchar size units",
"type": "string",
"enum": [
"BYTE",
"CHAR"
]
},
"fractionalSecondsPrecision": {
"description": "fractionalSecondsPrecision",
"type": "integer"
},
"yearPrecision": {
"description": "yearPrecision",
"type": "integer"
},
"dayPrecision": {
"description": "dayPrecision",
"type": "integer"
}
},
"anyOf": [
{
"if": {
"properties": {
"type": {
"const": "NUMBER"
}
}
},
"then": {
"required": [
"precision",
"scale"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "FLOAT"
}
}
},
"then": {
"required": [
"precision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "VARCHAR2"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "RAW"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "CHAR"
}
}
},
"then": {
"required": [
"length",
"sizeUnits"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NCHAR"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "UROWID"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "NVARCHAR2"
}
}
},
"then": {
"required": [
"length"
]
}
},
{
"if": {
"properties": {
"type": {
"enum": [
"TIME",
"TIME WITH TIMEZONE",
"TIMESTAMP",
"TIMESTAMP WITH TIME ZONE",
"TIMESTAMP WITH LOCAL TIME ZONE"
]
}
}
},
"then": {
"required": [
"fractionalSecondsPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL YEAR TO MONTH"
}
}
},
"then": {
"required": [
"yearPrecision"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "INTERVAL DAY TO SECOND"
}
}
},
"then": {
"required": [
"dayPrecision",
"fractionalSecondsPrecision"
]
}
}
]
},
"isPk": {
"description": "Is Primary Key",
"type": "boolean",
"default": false
},
"isUk": {
"description": "Is Unique Key",
"type": "boolean",
"default": false
},
"isFk": {
"description": "Is Foreign Key",
"type": "boolean",
"default": false
},
"domain": {
"description": "Column domain",
"type": "object",
"properties": {
"name": {
"description": "Domain name",
"type": "string"
},
"type": {
"description": "Domain type",
"type": "string"
},
"dislplay": {
"description": "Domain display",
"type": "string"
},
"order": {
"description": "Domain order",
"type": "string"
},
"annotations": {
"description": "Column domain annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
}
}
},
"annotations": {
"description": "Column annotations",
"type": "array",
"items": {
"$ref": "annotation"
}
},
"numDistinct": {
"description": "The number of distinct values in the column",
"type": "integer"
},
"lowValue": {
"description": "The low value in the column",
"type": "string"
},
"highValue": {
"description": "The high value in the column",
"type": "string"
},
"density": {
"description": "The average length of the column in bytes",
"type": "integer"
},
"avgColLen": {
"description": "The number of distinct values in the column",
"type": "integer"
},
"hiddenColumn": {
"description": "Indicates whether the column is a hidden column",
"type": "boolean"
},
"virtualColumn": {
"description": "Indicates whether the column is a virtual column",
"type": "boolean"
},
"reservableColumn": {
"description": "Indicates whether the column is a reservable column",
"type": "boolean"
},
"identityColumn": {
"description": "Indicates whether the column is a identity column",
"type": "boolean"
},
"encryptedColumn": {
"description": "Indicates whether the column is a encrypted column",
"type": "boolean"
}
},
"required": [
"name",
"isPk",
"isUk",
"isFk",
"dataType",
"notNull",
"hiddenColumn",
"virtualColumn",
"reservableColumn",
"identityColumn",
"encryptedColumn"
]
}
75.3.1.1.5 サブオブジェクト型のJSONスキーマ : constraints
レベルのサブオブジェクトconstraints
のJSONスキーマ: typical
およびall
。
表形式フォームのconstraints
サブオブジェクト・タイプのJSONスキーマ
表75-6 サブオブジェクト型のJSONスキーマ : CONSTRAINTS
フィールド | ||||
---|---|---|---|---|
BASIC | TYPICAL | ALL | ||
name | ✔ | ✔ | ||
constraintType | ✔ | ✔ | ||
searchCondition | ✔ | ✔ | ||
columns | name | ✔ | ✔ | |
referencedConstraintName | ✔ | ✔ | ||
referencedTable | ✔ | ✔ | ||
action | ✔ | ✔ | ||
referencedOwner | ✔ | ✔ | ||
referencedColumns | ✔ | ✔ | ||
status | ✔ | ✔ | ||
遅延可能 | ✔ | ✔ | ||
検証済み | ✔ | ✔ | ||
sysGeneratedName | ✔ | ✔ |
ノート:
constraintType
がREFERENTIAL INTEGRITY
に設定されている場合、スキーマには次のフィールドが必要です: referencedConstraintName
、 referencedOwner
、referencedTable
およびreferencedColumns
。
level
TYPICAL
のCONSTRAINT
サブオブジェクト型のJSONスキーマ
ノート:
制約スキーマは、BASIC level
には使用できません。
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/TYPICAL/object_info/constraint",
"title": "DBMS_DEVELOPER.GET_METADATA/TYPICAL/OBJECT_INFO/CONSTRAINT",
"description": "Information for constraint",
"type": "object",
"properties": {
"name": {
"description": "Constraint name",
"type": "string"
},
"constarintType": {
"description": "Type of constraint definition: CHECK, CHECK - NOT NULL, PRIMARY KEY, UNIQUE, REFERENTIAL INTEGRITY, VIEW CHECK, VIEW READONLY",
"type": "string"
},
"searchCondition": {
"description": "Text of search condition for a check constraint",
"type": "string"
},
"columns": {
"description": "Table columns",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name associated with column or attribute of object column specified in the constraint definition",
"type": "string"
}
}
}
},
"referencedConstraintName": {
"description": "Name of unique constraint definition for refernced table",
"type": "string"
},
"referencedTable": {
"description": "Name of table used in referential constraint",
"type": "string"
},
"action": {
"description": "On delete rule",
"type": {
"enum": [
"RESTRICT",
"CASCADE",
"SET NULL",
"SET DEFAULT"
]
}
},
"referencedOwner": {
"description": "Owner of table used in referential constraint",
"type": "string"
},
"referencedColumns": {
"description": "Refernced table columns",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Refernced table column name",
"type": "string"
}
}
}
},
"status": {
"description": "Constraint status",
"type": {
"enum": [
"ENABLED",
"DISABLED"
]
}
},
"deferrable": {
"description": "Deferrable",
"type": "boolean",
"default": false
},
"validated": {
"description": "Validated",
"type": {
"enum": [
"VALIDATED",
"NONVALIDATED"
]
}
},
"sysGeneratedName": {
"description": "System Generated constraint",
"type": "boolean"
}
},
"required": [
"name",
"constarintType",
"status",
"deferrable",
"validated",
"sysGeneratedName"
],
"if": {
"properties": {
"constarintType": {
"const": "REFERENTIAL INTEGRITY"
}
}
},
"then": {
"required": [
"referencedConstraintName",
"referencedOwner",
"referencedTable",
"referencedColumns"
]
}
}
level
ALL
のCONSTRAINT
サブオブジェクト型のJSONスキーマ
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://oracle.com/schema/23.9/DBMS_DEVELOPER.GET_METADATA/ALL/object_info/constraint",
"title": "DBMS_DEVELOPER.GET_METADATA/ALL/OBJECT_INFO/CONSTRAINT",
"description": "Information for constraint",
"type": "object",
"properties": {
"name": {
"description": "Constraint name",
"type": "string"
},
"constraintType": {
"description": "Type of constraint definition",
"type": "string"
},
"searchCondition": {
"description": "Text of search condition for a check constraint",
"type": "string"
},
"columns": {
"description": "Table columns",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name associated with column or attribute of object column specified in the constraint definition",
"type": "string"
},
"position": {
"description": "Original position of column or attribute in definition",
"type": "integer"
}
}
}
},
"referencedConstraintName": {
"description": "Name of unique constraint definition for refernced table",
"type": "string"
},
"referencedTable": {
"description": "Name of table used in referential constraint",
"type": "string"
},
"action": {
"description": "On delete rule",
"type": {
"enum": [
"RESTRICT",
"CASCADE",
"SET NULL",
"SET DEFAULT"
]
}
},
"referencedOwner": {
"description": "Owner of table used in referential constraint",
"type": "string"
},
"referencedColumns": {
"description": "Refernced table columns",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Refernced table column name",
"type": "string"
},
"position": {
"description": "Original position of column or attribute in definition",
"type": "integer"
}
}
}
},
"status": {
"description": "Constraint status",
"type": {
"enum": [
"ENABLED",
"DISABLED"
]
}
},
"deferrable": {
"description": "Deferrable",
"type": "boolean",
"default": false
},
"validated": {
"description": "Validated",
"type": {
"enum": [
"VALIDATED",
"NONVALIDATED"
]
}
},
"sysGeneratedName": {
"description": "System Generated constraint",
"type": "boolean"
}
},
"required": [
"name",
"constarintType"
],
"if": {
"properties": {
"constarintType": {
"const": "REFERENTIAL INTEGRITY"
}
}
},
"then": {
"required": [
"referencedConstraintName",
"referencedOwner",
"referencedTable",
"referencedColumns"
]
}
}