refs #703: route schema metadata through MyBatis

This commit is contained in:
devmrko
2026-07-23 10:29:22 +09:00
parent 99798aa6bb
commit b106e40631
7 changed files with 384 additions and 114 deletions

View File

@@ -0,0 +1,87 @@
package com.cloudhandson.vpdbackoffice.mapper;
import com.cloudhandson.vpdbackoffice.domain.schemametadata.SchemaMetadataAnnotationRow;
import com.cloudhandson.vpdbackoffice.domain.schemametadata.SchemaMetadataColumnRow;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* All database access for the schema metadata screen. Identifier parameters
* are validated against the screen's closed table list before mapper calls.
*/
@Mapper
public interface SchemaMetadataMapper {
String findTableComment(@Param("owner") String owner, @Param("tableName") String tableName);
List<SchemaMetadataColumnRow> findColumns(
@Param("owner") String owner,
@Param("tableName") String tableName
);
List<SchemaMetadataAnnotationRow> findAnnotations(
@Param("owner") String owner,
@Param("tableName") String tableName
);
int countColumn(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("columnName") String columnName
);
int countTableAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("annotationName") String annotationName
);
int countColumnAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("columnName") String columnName,
@Param("annotationName") String annotationName
);
void updateTableComment(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("commentLiteral") String commentLiteral
);
void updateColumnComment(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("columnName") String columnName,
@Param("commentLiteral") String commentLiteral
);
void dropTableAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("annotationName") String annotationName
);
void addTableAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("annotationName") String annotationName,
@Param("annotationValueLiteral") String annotationValueLiteral
);
void dropColumnAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("columnName") String columnName,
@Param("annotationName") String annotationName
);
void addColumnAnnotation(
@Param("owner") String owner,
@Param("tableName") String tableName,
@Param("columnName") String columnName,
@Param("annotationName") String annotationName,
@Param("annotationValueLiteral") String annotationValueLiteral
);
}