You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:41:43 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

strongduanmu opened a new issue, #16086:
URL: https://github.com/apache/shardingsphere/issues/16086

   ## Feature Request
   
   To support handling of foreign key constraints in issue #16050, ConstraintMetaData needs to be added to the metadata. 
   
   Add `Map<String, Constraint MetaData> constraints` to TableMetaData:
   
   ```java
   /**
    * Table meta data.
    */
   @Getter
   @EqualsAndHashCode
   @ToString
   public final class TableMetaData {
       
       private final String name;
       
       private final Map<String, ColumnMetaData> columns;
       
       private final Map<String, IndexMetaData> indexes;
       
       private final Map<String, ConstraintMetaData> constrains;
       
       private final List<String> primaryKeyColumns = new ArrayList<>();
   }
   
   /**
    * Constraint meta data.
    */
   @RequiredArgsConstructor
   @Getter
   @EqualsAndHashCode
   @ToString
   public final class ConstraintMetaData {
       
       private final String name;
       
       private final String referencedTableName;
   }
   ```
   
   Then add query logic for constraints in MySQLTableMetaDataLoader.
   
   ```sql
   SELECT CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.KEY_COLUMN_USAGE
          WHERE TABLE_NAME IN ('bmsql_district_0') AND REFERENCED_TABLE_SCHEMA IS NOT NULL;
   ```
   
   - [x] Support MySQL constraint meta data load
   - [x] Support Postgresql constraint meta data load
   - [ ] Support openGauss constraint meta data load
   - [ ] Support Oracle constraint meta data load
   - [ ] Support SQLServer constraint meta data load
   
   ### Is your feature request related to a problem?
   
   issue #16050
   
   ### Describe the feature you would like.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #16086:
URL: https://github.com/apache/shardingsphere/issues/16086#issuecomment-1229018896

   @lhyundeadsoul Yes, are you interested in completing it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] closed issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic
URL: https://github.com/apache/shardingsphere/issues/16086


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] commented on issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #16086:
URL: https://github.com/apache/shardingsphere/issues/16086#issuecomment-1272350199

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider adding ConstraintMetaData to metadata to support constraint segment merge logic [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #16086:
URL: https://github.com/apache/shardingsphere/issues/16086#issuecomment-2026021061

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] lhyundeadsoul commented on issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

Posted by GitBox <gi...@apache.org>.
lhyundeadsoul commented on issue #16086:
URL: https://github.com/apache/shardingsphere/issues/16086#issuecomment-1228299201

   @strongduanmu About this issue, do you mean we should continue to implement `SQLServer/Oracle/openGauss/Postgresql` metadataloader like `mysql`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu closed issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #16086: Consider adding ConstraintMetaData to metadata to support constraint segment merge logic
URL: https://github.com/apache/shardingsphere/issues/16086


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org