Menu

#55 [Perl]Use cci_schema_info for primary_key_info and foreign_key_info

open
nobody
None
5
2012-01-07
2012-01-07
Jira Trac
No

[cci_schema_info|http://www.cubrid.org/manual/840/en/cci_schema_info] is used to get schema information in CCI. If it is performed successfully, the results are managed by the request handle and can be fetched by fetch and get data. The result set of CCI_SCH_PRIMARY_KEY is similar to primary_key_info, and the result sets of CCI_SCH_CROSS_REFERENCE, CCI_SCH_EXPORTED_KEYS and CCI_SCH_IMPORTED_KEYS are similar to foreign_key_info. The following are details about the results sets for both cci_schema_info and primary_key_info, foreign_key_info.

primary_key_info:

||CCI_SCH_PRIMARY_KEY of cci_schema_info||Result set of primary_key_info||
|- CLASS_NAME
- ATTR_NAME
- KEY_SEQ
- KEY_NAME|- TABLE_CAT
- TABLE_SCHEM
- TABLE_NAME
- COLUMN_NAME
- KEY_SEQ
- PK_NAME|

foreign_key_info:

||CCI_SCH_CROSS_REFERENCE,
CCI_SCH_EXPORTED_KEYS,
CCI_SCH_IMPORTED_KEYS
of cci_schema_info||Result set of foreign_key_info||
|- PKTABLE_NAME
- PKCOLUMN_NAME
- FKCOLUMN_NAME
- FKCOLUMN_NAME
- KEY_SEQ
- UPDATE_ACTION
- DELETE_ACTION
- FK_NAME
- PK_NAME|- PKTABLE_CAT
- PKTABLE_SCHEM
- PKTABLE_NAME
- PKCOLUMN_NAME
- FKTABLE_CAT
- FKTABLE_SCHEM
- FKTABLE_NAME
- FKCOLUMN_NAME
- KEY_SEQ
- UPDATE_RULE
- DELETE_RULE
- FK_NAME
- PK_NAME
- DEFERRABILITY|

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.