Skip to content

Commit

Permalink
fixTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingjian Wu committed Jun 2, 2024
1 parent 57b461f commit c2adfdf
Showing 1 changed file with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
*/
public interface ParentChildRelMetadataService {
/**
* Create parent child relationship with its relation type.
* Establishes a parent-child relationship with a specified relation type.
* Currently, exceptions are thrown in the following cases:
* 1. Attempting to create a child table as the parent of another child table.
* 2. A child table having more than one parent.
*
* @param parentName parentName
* @param childName childName
* @param relationType type of the relationship
* @param parentName the name of the parent entity
* @param childName the name of the child entity
* @param relationType the type of the relationship
*/
void createParentChildRelation(
QualifiedName parentName,
Expand All @@ -25,20 +28,29 @@ void createParentChildRelation(
);

/**
* Rename oldName to newName in the parentChildRelationship store.
* Renames `oldName` to `newName` in the parentChildRelationship store.
* This involves two steps:
* 1. Rename all records where the child is `oldName` to `newName`.
* 2. Rename all records where the parent is `oldName` to `newName`.
* Since a child cannot be a parent of another entity, only one of these actions will need to be performed.
*
* @param oldName oldName
* @param newName newName
* @param oldName the current name to be renamed
* @param newName the new name to rename to
*/
void rename(
QualifiedName oldName,
QualifiedName newName
);

/**
* drop the entity from the parentChildRelationship store.
* Removes the entity from the parentChildRelationship store.
* An exception is thrown if an attempt is made to drop a parent table that still has existing child tables.
* Note that only dropping a child table will result in the physical deletion of records.
* When all children of a parent table are dropped, no records remain.
* Consequently, at then time when dropping the parent table, there should not have any database records
* with a parent reference to the dropping parent table.
*
* @param name name
* @param name the name of the entity to drop
*/
void drop(
QualifiedName name
Expand Down

0 comments on commit c2adfdf

Please sign in to comment.