mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-28 01:11:31 +08:00
✅ test(sidebar): 补齐视图元数据加载测试桩返回字段
This commit is contained in:
@@ -38,22 +38,25 @@ describe("buildSchemasMetadataQuerySpecs", () => {
|
||||
if (sql.includes("information_schema.views")) {
|
||||
return {
|
||||
success: true,
|
||||
message: "",
|
||||
data: [{ view_name: "CHARACTER_SETS", schema_name: "information_schema" }],
|
||||
};
|
||||
}
|
||||
if (sql.includes("information_schema.tables")) {
|
||||
return {
|
||||
success: true,
|
||||
message: "",
|
||||
data: [{ view_name: "CHARACTER_SETS", schema_name: "information_schema", table_type: "SYSTEM VIEW" }],
|
||||
};
|
||||
}
|
||||
if (sql.includes("SHOW FULL TABLES FROM `information_schema` WHERE Table_type = 'VIEW'")) {
|
||||
return {
|
||||
success: true,
|
||||
message: "",
|
||||
data: [{ Tables_in_information_schema: "CHARACTER_SETS", Table_type: "VIEW" }],
|
||||
};
|
||||
}
|
||||
return { success: false, data: [] };
|
||||
return { success: false, message: "", data: [] };
|
||||
});
|
||||
|
||||
const result = await loadViews({ config: { type: "mysql" } }, "information_schema");
|
||||
|
||||
Reference in New Issue
Block a user