-
Notifications
You must be signed in to change notification settings - Fork 126
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
Conversation
…t that created the synonym
src/broker/broker_cas_cci.h
Outdated
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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]>
@kisoo-han @beyondykk9 |
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