Add analyze table action (#737)

This commit is contained in:
Dan Sosedoff 2024-05-14 20:40:39 -07:00 committed by GitHub
parent cf86131808
commit 40f582d1ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -298,6 +298,7 @@
<div id="tables_context_menu">
<ul class="dropdown-menu" role="menu">
<li><a href="#" data-action="copy">Copy Table Name</a></li>
<li><a href="#" data-action="analyze">Analyze Table</a></li>
<li class="divider"></li>
<li><a href="#" data-action="export" data-format="json">Export to JSON</a></li>
<li><a href="#" data-action="export" data-format="csv">Export to CSV</a></li>

View File

@ -340,6 +340,12 @@ function performTableAction(table, action, el) {
case "copy":
copyToClipboard(table.split('.')[1]);
break;
case "analyze":
executeQuery("ANALYZE " + table, function(data) {
if (data.error) alert(data.error);
resetTable();
});
break;
}
}