feat: update table ui (#160)
* feat: update table ui * fix: code checkstyle
This commit is contained in:
parent
b8a757e70f
commit
0919b70d25
|
@ -1 +1 @@
|
||||||
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir</title><script defer="defer" type="module" src="/js/chunk-vendors.9effab81.js"></script><script defer="defer" type="module" src="/js/app.032828f8.js"></script><link href="/css/chunk-vendors.81898547.css" rel="stylesheet"><link href="/css/app.15b40a89.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.fb0c8458.js" nomodule></script><script defer="defer" src="/js/app-legacy.cc3cc5e0.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>databasir</title><script defer="defer" type="module" src="/js/chunk-vendors.9effab81.js"></script><script defer="defer" type="module" src="/js/app.8385ef8b.js"></script><link href="/css/chunk-vendors.81898547.css" rel="stylesheet"><link href="/css/app.15b40a89.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.fb0c8458.js" nomodule></script><script defer="defer" src="/js/app-legacy.6ec5a066.js" nomodule></script></head><body><noscript><strong>We're sorry but databasir doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
Subproject commit 215f052d23d0afac35de443675a8828aca94476f
|
Subproject commit 5d5475fe2b089865bf19e6c945119bf3368248a6
|
|
@ -35,16 +35,16 @@ public class SqlServerColumnMetaProvider implements ColumnMetaProvider {
|
||||||
|
|
||||||
private Map<String, String> getColumnRemarks(Connection connection,
|
private Map<String, String> getColumnRemarks(Connection connection,
|
||||||
TableCondition condition) {
|
TableCondition condition) {
|
||||||
String sql = "SELECT col.name AS COLUMN_NAME,\n" +
|
String sql = "SELECT col.name AS COLUMN_NAME,\n"
|
||||||
" ep.value AS REMARKS\n" +
|
+ " ep.value AS REMARKS\n"
|
||||||
"FROM sys.tables AS tab\n" +
|
+ "FROM sys.tables AS tab\n"
|
||||||
" INNER JOIN sys.columns AS col\n" +
|
+ " INNER JOIN sys.columns AS col\n"
|
||||||
" ON tab.object_id = col.object_id\n" +
|
+ " ON tab.object_id = col.object_id\n"
|
||||||
" LEFT JOIN sys.extended_properties AS ep " +
|
+ " LEFT JOIN sys.extended_properties AS ep "
|
||||||
"ON ep.major_id = col.object_id AND ep.minor_id = col.column_id\n" +
|
+ "ON ep.major_id = col.object_id AND ep.minor_id = col.column_id\n"
|
||||||
"WHERE tab.name LIKE ?\n" +
|
+ "WHERE tab.name LIKE ?\n"
|
||||||
" AND SCHEMA_NAME(tab.schema_id) LIKE ?\n" +
|
+ " AND SCHEMA_NAME(tab.schema_id) LIKE ?\n"
|
||||||
"ORDER BY tab.name, column_id;";
|
+ "ORDER BY tab.name, column_id;";
|
||||||
|
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
PreparedStatement preparedStatement = null;
|
PreparedStatement preparedStatement = null;
|
||||||
|
|
|
@ -30,16 +30,16 @@ public class SqlServerTableMetaProvider implements TableMetaProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TableMeta> selectTables(Connection connection, Condition condition) {
|
public List<TableMeta> selectTables(Connection connection, Condition condition) {
|
||||||
String sql = "SELECT sys.objects.name AS TABLE_NAME,\n" +
|
String sql = "SELECT sys.objects.name AS TABLE_NAME,\n"
|
||||||
" sys.objects.type_desc AS TABLE_TYPE,\n" +
|
+ " sys.objects.type_desc AS TABLE_TYPE,\n"
|
||||||
" CAST(extended_properties.value AS NVARCHAR(500)) AS REMARKS\n" +
|
+ " CAST(extended_properties.value AS NVARCHAR(500)) AS REMARKS\n"
|
||||||
"FROM sys.objects\n" +
|
+ "FROM sys.objects\n"
|
||||||
" LEFT JOIN sys.schemas ON sys.objects.schema_id = sys.schemas.schema_id\n" +
|
+ " LEFT JOIN sys.schemas ON sys.objects.schema_id = sys.schemas.schema_id\n"
|
||||||
" LEFT JOIN sys.extended_properties " +
|
+ " LEFT JOIN sys.extended_properties "
|
||||||
"ON sys.objects.object_id = sys.extended_properties.major_id\n" +
|
+ "ON sys.objects.object_id = sys.extended_properties.major_id\n"
|
||||||
"WHERE (type = 'U' OR type = 'V')\n" +
|
+ "WHERE (type = 'U' OR type = 'V')\n"
|
||||||
" AND sys.extended_properties.minor_id = 0\n" +
|
+ " AND sys.extended_properties.minor_id = 0\n"
|
||||||
" AND sys.schemas.name LIKE ?;\n";
|
+ " AND sys.schemas.name LIKE ?;\n";
|
||||||
PreparedStatement preparedStatement = null;
|
PreparedStatement preparedStatement = null;
|
||||||
try {
|
try {
|
||||||
preparedStatement = connection.prepareStatement(sql);
|
preparedStatement = connection.prepareStatement(sql);
|
||||||
|
|
|
@ -22,37 +22,37 @@ public class SqlServerTriggerMetaProvider implements TriggerMetaProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TriggerMeta> selectTriggers(Connection connection, TableCondition condition) {
|
public List<TriggerMeta> selectTriggers(Connection connection, TableCondition condition) {
|
||||||
String sql = "SELECT SCHEMA_NAME(tab.schema_id) + '.' + tab.name AS table_name,\n" +
|
String sql = "SELECT SCHEMA_NAME(tab.schema_id) + '.' + tab.name AS table_name,\n"
|
||||||
" trig.name AS trigger_name,\n" +
|
+ " trig.name AS trigger_name,\n"
|
||||||
" trig.create_date AS create_date,\n" +
|
+ " trig.create_date AS create_date,\n"
|
||||||
" CASE\n" +
|
+ " CASE\n"
|
||||||
" WHEN is_instead_of_trigger = 1 THEN 'Instead of'\n" +
|
+ " WHEN is_instead_of_trigger = 1 THEN 'Instead of'\n"
|
||||||
" ELSE 'After' END AS timing,\n" +
|
+ " ELSE 'After' END AS timing,\n"
|
||||||
" (CASE\n" +
|
+ " (CASE\n"
|
||||||
" WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsUpdateTrigger') = 1\n" +
|
+ " WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsUpdateTrigger') = 1\n"
|
||||||
" THEN 'Update '\n" +
|
+ " THEN 'Update '\n"
|
||||||
" ELSE '' END\n" +
|
+ " ELSE '' END\n"
|
||||||
" + CASE\n" +
|
+ " + CASE\n"
|
||||||
" WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsDeleteTrigger') = 1\n" +
|
+ " WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsDeleteTrigger') = 1\n"
|
||||||
" THEN 'Delete '\n" +
|
+ " THEN 'Delete '\n"
|
||||||
" ELSE '' END\n" +
|
+ " ELSE '' END\n"
|
||||||
" + CASE\n" +
|
+ " + CASE\n"
|
||||||
" WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsInsertTrigger') = 1\n" +
|
+ " WHEN OBJECTPROPERTY(trig.object_id, 'ExecIsInsertTrigger') = 1\n"
|
||||||
" THEN 'Insert '\n" +
|
+ " THEN 'Insert '\n"
|
||||||
" ELSE '' END\n" +
|
+ " ELSE '' END\n"
|
||||||
" ) AS manipulation,\n" +
|
+ " ) AS manipulation,\n"
|
||||||
" CASE\n" +
|
+ " CASE\n"
|
||||||
" WHEN trig.[type] = 'TA' THEN 'Assembly (CLR) trigger'\n" +
|
+ " WHEN trig.[type] = 'TA' THEN 'Assembly (CLR) trigger'\n"
|
||||||
" WHEN trig.[type] = 'TR' THEN 'SQL trigger'\n" +
|
+ " WHEN trig.[type] = 'TR' THEN 'SQL trigger'\n"
|
||||||
" ELSE '' END AS [TYPE],\n" +
|
+ " ELSE '' END AS [TYPE],\n"
|
||||||
" CASE\n" +
|
+ " CASE\n"
|
||||||
" WHEN is_disabled = 1 THEN 'Disabled'\n" +
|
+ " WHEN is_disabled = 1 THEN 'Disabled'\n"
|
||||||
" ELSE 'Active' END AS [status],\n" +
|
+ " ELSE 'Active' END AS [status],\n"
|
||||||
" OBJECT_DEFINITION(trig.object_id) AS STATEMENT\n" +
|
+ " OBJECT_DEFINITION(trig.object_id) AS STATEMENT\n"
|
||||||
"FROM sys.triggers trig\n" +
|
+ "FROM sys.triggers trig\n"
|
||||||
" INNER JOIN sys.objects tab\n" +
|
+ " INNER JOIN sys.objects tab\n"
|
||||||
" ON trig.parent_id = tab.object_id\n" +
|
+ " ON trig.parent_id = tab.object_id\n"
|
||||||
"WHERE SCHEMA_NAME(tab.schema_id) = ? AND tab.name = ?";
|
+ "WHERE SCHEMA_NAME(tab.schema_id) = ? AND tab.name = ?";
|
||||||
PreparedStatement preparedStatement = null;
|
PreparedStatement preparedStatement = null;
|
||||||
List<TriggerMeta> triggerMetas = new ArrayList<>();
|
List<TriggerMeta> triggerMetas = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue