Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-24835] Added reading the schema information of the target object that created the synonym #4473

Merged
merged 9 commits into from
Aug 7, 2023
Merged

Conversation

airnet73
Copy link
Contributor

@airnet73 airnet73 commented Jul 6, 2023

http://jira.cubrid.org/browse/CBRD-24835

Purpose
Synonyms were added in cubrid 11.2. However, there is no way to read synonym schema information through cci api.
As a way to read synonym information is needed, a way to read schema information of the user who created the synonym using cci_schema_info() is needed.

If the user name and synonym name are entered in cci_schema_info(), the schema information of the target object must be read when the synonym is created.

In this issue, only the function to read the column information of the target object corresponding to the synonym was added.

Implementation
To read the column information of the target object in the synonym, the type below must be used.
Type : CCI_SCH_ATTR_WITH_SYNONYM

If CCI_SCH_ATTR_WITH_SYNONYMand [schema].[synonym] are used for the type and class_name parameters of the cci_schema_info() function, column information of the synonym target object is returned.

cci_schema_info(conn, CCI_SCH_ATTR_WITH_SYNONYM, "u1.s1", NULL, CCI_ATTR_NAME_PATTERN_MATCH, &error);

Remarks
N/A

@airnet73 airnet73 requested review from kisoo-han and beyondykk9 July 6, 2023 05:46
@airnet73 airnet73 self-assigned this Jul 6, 2023
@@ -192,7 +192,8 @@ typedef enum
CCI_SCH_IMPORTED_KEYS,
CCI_SCH_EXPORTED_KEYS,
CCI_SCH_CROSS_REFERENCE,
CCI_SCH_LAST = CCI_SCH_CROSS_REFERENCE
CCI_SCH_ATTR_INCLUDE_SYNONYM,
CCI_SCH_LAST = CCI_SCH_ATTR_INCLUDE_SYNONYM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also reflect this modification to cas_cci.h of cubrid-cci repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right.
I will PR the cubrid-cci repo.

airnet73 and others added 8 commits August 2, 2023 17:33
change type name

Co-authored-by: Byungwook Kim <[email protected]>
change function name

Co-authored-by: Byungwook Kim <[email protected]>
change type name

Co-authored-by: Byungwook Kim <[email protected]>
change function name

Co-authored-by: Byungwook Kim <[email protected]>
change type name

Co-authored-by: Byungwook Kim <[email protected]>
change function name

Co-authored-by: Byungwook Kim <[email protected]>
@airnet73
Copy link
Contributor Author

airnet73 commented Aug 4, 2023

@kisoo-han @beyondykk9
Changed function name and type name.
Please confirm.

@airnet73 airnet73 merged commit 44153fc into CUBRID:develop Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants